SOLVED
I just installed "sudo apt-get install gcc-multilib" and it allowed to compile succesfully using the following command:
gcc -m32 -o invoke -I$JAVA_HOME/include -I$JAVA_HOME/include/linux cCode.c $JAVA_HOME/jre/lib/i386/server/libjvm.so
Than you very much all!
Here is downloadable source code: http://cfile237.uf.daum.net/attach/247819495212DF1C07B9EB
well, first, my ubuntu is 64bit 12.04LTS. and, I installed both 64 and 32bit version of latest jdk 1.7.0_25.
I tried to compile the source code above using 32 bit library of jdk version on my 64bit Ubuntu, it shows a following error:
/usr/lib/jvm/jdk1.7.0_25_x86/jre/lib/i386/server/libjvm.so: could not read symbols: File in wrong format
collect2: ld returned 1 exit status
However, if I try to compile those source code using 64 bit library of jdk version, it compiles fine and run very well.
My problem is, as you know, how would I make it compile and run well using 32 bit version of jdk library on 64bit Ubuntu platform?
AH, before I compile, I always typed following commands on Terminal,
for 32 bit compile
export PATH=$PATH:/usr/lib/jvm/jdk1.7.0_25_x86/bin
export JAVA_HOME=/usr/lib/jvm/jdk1.7.0_25_x86
export LD_LIBRARY_PATH=$JAVA_HOME/jre/lib/i386:$JAVA_HOME/jre/lib/i386/server
for 64 bit compile
export PATH=$PATH:/usr/lib/jvm/jdk1.7.0_25_x64/bin
export JAVA_HOME=/usr/lib/jvm/jdk1.7.0_25_x64
export LD_LIBRARY_PATH=$JAVA_HOME/jre/lib/amd64:$JAVA_HOME/jre/lib/amd64/server