relocation R_X86_64_32

Ahcène Bendjoudi ahcene.bendjoudi at
Thu May 10 09:13:54 UTC 2007


I want to comunicate between to applications (java/c++). So i made necessary
instructions, but when i tried to compile my code source with g++ it screen
this message This same code worked well on an other machine (intell) :

-bash-2.05b$ g++ -o -shared Test.cpp
/usr/bin/ld: /tmp/ccUa8GTk.o: relocation R_X86_64_32 can not be used when
making a shared object; recompile with -fPIC
/tmp/ccUa8GTk.o: could not read symbols: Bad value
collect2: ld returned 1 exit status
And when I recompiled with -fPIC :
-bash-2.05b$ g++ -o -shared -fPIC Test.cpp
-bash-2.05b$ ls
Test.class Test.cpp  Test.h
So it seams that the file was created, but when I tried to
execute it :
-bash-2.05b$ java -Djava.library.path=. -classpath . Test
Exception in thread "main" java.lang.UnsatisfiedLinkError: no Test in
        at java.lang.ClassLoader.loadLibrary(
        at java.lang.Runtime.loadLibrary0(
        at java.lang.System.loadLibrary(
        at Test.<clinit>(
some one can solve this

Thanks in advance

More information about the freebsd-amd64 mailing list