undefined reference to `_Jv_FindSymbolInExecutable(char const*)'
Andrew Haley
aph@cambridge.redhat.com
Tue Sep 4 09:16:00 GMT 2001
Stefan Wanner writes:
> hello
>
> i'm trying to build a gcc-crosscompiler for a mpc823 with java support.
> after some little hacks in the configure file of libffi and libjava, i was
> able to compile gcc-3.0.1.
Very cool.
> i used the following command to configure:
>
> p2:~gcc-build #
> ../gcc-3.0.1/configure --host=i586-pc-linux --target=powerpc-linux --prefix=
> /opt/cross --with-gnu-as --with-gnu-ld --with-cpu=860 --nfp --enable-languag
> es=c,java,c++ --enable-threads=posix --disable-multilib
>
> now, after make install, i tried to compile a helloworld program, but it
> fails with the following error:
>
> p2:~#gcj --main=helloworld helloworld.java
> /opt/cross/lib/gcc-lib/powerpc-linux/3.0.1/../../../../powerpc-linux/lib/lib
> gcj.so: undefined reference to `_Jv_FindSymbolInExecutable(char const*)'
> /opt/cross/lib/gcc-lib/powerpc-linux/3.0.1/../../../../powerpc-linux/lib/lib
> gcjgc.so: undefined reference to `dlopen'
> collect2: ld returned 1 exit status
>
> any idea?
Try linking -static.
Andrew.
More information about the Java
mailing list