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

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

 



Good observation. I added '-l stdc++' to the ld call. I also had to add a symlink in /usr/lib (it only contained libstdc++.so.6 and libstdc++.so.6.14. I added libstdc++.so --> libstdc++.so.6)

Same error, though.


On Feb 27, 2011, at 12:15 PM, Jonathan Wakely wrote:

> 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