ld link error under gcj on RedHat 9.0

Miguel mth@mth.com
Tue May 20 23:58:00 GMT 2003


In trying to compile/link my first .java program using gcj I am getting
the following error message:

   [mth@hucho bm]$ gcj Rbm.java
   /usr/bin/ld: cannot find -lz
   collect2: ld returned 1 exit status

If I separate compiling from linking I get the same

    [mth@hucho bm]$ gcj -c -g -O Rbm.java
    [mth@hucho bm]$ gcj --main=Rbm -o Rbm Rbm.o
    /usr/bin/ld: cannot find -lz
    collect2: ld returned 1 exit status
    [mth@hucho bm]$

I am running RedHat 9.0 and just installed (and reinstalled) from the
rpms. I got no complaints during the installation of the packages.

When I use gcc things compile and link fine.
I don't have any experience with ld.

Any help would be appreciated.

Thanks in advance,
Miguel








More information about the Java mailing list