Re: UnsatisfiedLinkError (gxx and gcj) with JNI and C++ but not C

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 27 February 2011 16:57, Andrew Richardson wrote:
>
> Please note that I compile my source with:
>         g++ -Wall -g -lstdc++ -shared -O2 -c -fPIC -D_REENTRANT filename.cpp -I/usr/lib/jvm/java-6-openjdk/include/

Specifying the linker option -lstdc++ doesn't do anything when compiling.

> and link with:
>        ld --shared filename.o -o libfilename.so

You haven't used -lstdc++ during linking.

If you use g++ to link instead of ld then it should automatically add
-lstdc++ anyway.



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux