UnsatisfiedLinkError (gxx and gcj) with JNI and C++ but not C
Marc Glisse
marc.glisse@inria.fr
Mon Feb 28 00:12:00 GMT 2011
On Sun, 27 Feb 2011, Andrew Richardson wrote:
> Exception in thread "main" java.lang.UnsatisfiedLinkError: /home/chardson/chardson/parallelsurf/lib/libparallelsurf.so: /home/chardson/chardson/parallelsurf/lib/libparallelsurf.so: undefined symbol: __gcj_personality_v0
[...]
> Originally I got __gxx_personality_v0 instead of gcj, but I included the
> pragma for java_exceptions noted commonly online. I have tried searching
> extensively for a solution, but have not been successful. This post from
> 2002 to gcc-help simply claims the solution is linking to libstdc++, but
> my error does not change:
Hmm, let's see. When the error is about missing __gcc_personality_v0, you
should link with -lgcc_s. For __gxx_personality_v0, -lstdc++. Let's try
and guess where __gcj_personality_v0 might come from. -lgcj maybe?
--
Marc Glisse
More information about the Gcc-help
mailing list