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 18:59, Andrew Richardson <a.chardson@xxxxxxxxx> wrote:
> Either Ubuntu 10.10 (or my personal standard package list -- I just
> installed 10.10 today) already comes with libstdc++6-4.4-dev. Just for fun,
> I installed libstdc++6-4.5-dev. I also grabbed libgcj11-dev, but I get the
> same error.  Here's the output of the makefile:
> [exec] javah -classpath ../../parallelsurf.jar -jni
> parallelsurf.ParallelSURF
> [exec] g++ -Wall -lstdc++ -shared -O2 -c -fPIC -D_REENTRANT
> parallelsurf_jni.cpp -I/usr/lib/jvm/java-6-openjdk/include/
> [exec] ld -l stdc++ --shared parallelsurf_jni.o -o libparallelsurf.so
>
> I can confirm that /usr/lib/gcc/x86_64-linux-gnu/4.5/ contains libstdc++.a
> and (in /usr/lib). There's also a symlink there (libstdc++.so -->
> /usr/lib/libstdc++.so.6). Since ld couldn't find libstdc++.so, I thought it
> might not know about this directory and might not know about other important
> bits there. I added it to the search path for ld (-L /usr/lib/gcc/...) and
> built again. No improvement (still __gcj_personality_v0)

If you link with g++ instead of ld that shouldn't be necessary, but I
don't think that's the problem.



[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