AppletTalk.com Forum Index AppletTalk.com
Java discussions newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

problem to compile with gcj

 
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java Help
View previous topic :: View next topic  
Author Message
os2
Guest





PostPosted: Fri Jul 30, 2004 11:25 pm    Post subject: problem to compile with gcj Reply with quote



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





PostPosted: Sat Jul 31, 2004 6:34 pm    Post subject: Re: problem to compile with gcj Reply with quote



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
Display posts from previous:   
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java Help All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.