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.