This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
undefined reference to `_Jv_FindSymbolInExecutable(char const*)'
- To: "Stefan Wanner" <stefan dot wanner at ymail dot ch>
- Subject: undefined reference to `_Jv_FindSymbolInExecutable(char const*)'
- From: Andrew Haley <aph at cambridge dot redhat dot com>
- Date: Wed, 5 Sep 2001 01:18:43 +0100 (BST)
- Cc: <java at gcc dot gnu dot org>
- References: <00e301c1354d$5d89cb30$4c048892@ntb.ch>
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.