This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: UnsatisfiedLinkError (gxx and gcj) with JNI and C++ but not C
- From: Marc Glisse <marc dot glisse at inria dot fr>
- To: Andrew Richardson <a dot chardson at gmail dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Sun, 27 Feb 2011 21:32:18 +0100 (CET)
- Subject: Re: UnsatisfiedLinkError (gxx and gcj) with JNI and C++ but not C
- References: <746C877A-6A06-4AD7-A907-E04C4F6B969E@gmail.com>
- Reply-to: gcc-help at gcc dot gnu dot org
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