 |
AppletTalk.com Java discussions newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
os2 Guest
|
Posted: Fri Jul 30, 2004 11:25 pm Post subject: problem to compile with gcj |
|
|
hi
i installed gcj via yast (suse 9.1)
i write a little HelloWorld
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello word");
}
}
when i try to compile i do:
collinm@linux:~> gcj --main=3DHelloWorld -o HelloWorld HelloWorld.java
i get:
/usr/lib/gcc-lib/i586-suse-linux/3.3.3/../../../../i586-suse-linux/bin/ld:
cannot find -lz
collect2: ld returned 1 exit status
any idea?
|
|
| Back to top |
|
 |
os2 Guest
|
Posted: Sat Jul 31, 2004 6:34 pm Post subject: Re: problem to compile with gcj |
|
|
Daniel Sjöblom <dsjoblom (AT) mbnet (DOT) fi_NOSPAM> wrote in message
| Quote: |
The linker can apparently not find libz. Either you don't have the
archive or it can not be found on the default lib path. You should have
a file called libz.a and preferrably also a file called libz.so in
/usr/lib or some other directory that the linker searches. If libz
happens to be located somewhere else you can add that path to the search
path by using the -L option when compiling (man gcc, man ld). Otherwise,
you'll need to find and install libz.
If you need more help, ask again in a group more suited to your problem,
like a unix/linux/gnu group.
i have the file |
collinm@linux:~> locate libz
/lib/libz.so.1
/lib/libz.so.1.2.1
/usr/lib/libz.so.1
/usr/lib/libzvbi.so.0
/usr/lib/libzvbi.so.0.2.0
/usr/lib/SunJava2-1.4.2/jre/lib/i386/libzip.so
collinm@linux:~> echo $PATH
/home/collinm/bin:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/games:/opt/gnome/bin:/opt/kde3/bin:/usr/lib/java/bin
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|