home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!paladin.american.edu!howland.reston.ans.net!zaphod.mps.ohio-state.edu!moe.ksu.ksu.edu!matt.ksu.ksu.edu!news
- From: probreak@matt.ksu.ksu.edu (James Michael Chacon)
- Newsgroups: comp.os.linux
- Subject: Re: G++:where is the c++ library? I couldn't link c++ program.
- Date: 1 Jan 1993 13:13:09 -0600
- Organization: Kansas State University
- Lines: 25
- Message-ID: <1i2545INNpb@matt.ksu.ksu.edu>
- References: <1992Dec28.134302.12378@news.ysu.edu> <C026Gw.Cqq@mach1.wlu.ca>
- NNTP-Posting-Host: matt.ksu.ksu.edu
-
- kfisher3@mach1.wlu.ca (kevin fisher U) writes:
-
- >Weijin Mai (ah214@yfn.ysu.edu) wrote:
- >:
- >: I compiled the C++ program and produced an object file. The problem is
- >: I couldn't link it with the appropiate c++ library. My program uses cout and
- >: cin and the linker doesn't find the library for these two functions. I used
- >: the -llibrary switch and tried out all the library in usr/lib without success.
- >: Why can't g++/gcc determine the library it needs from header file?[D[
- >: What is the library for iostream.h?
-
- >I had this problem, and someone kindly enlightened me, so I will enlighten
- >you--compile using the -static option. All your woes will end.
- >The samaritan that helped me said it was because gcc can only use the static
- >libraries or something.
-
- Actually what you should do is use the -nojump option instead. This way, the
- shared libraries get linked in, and you don't have huge binaries in the end.
-
- You have to use either -nojump or -static, because the g++ stuff hasn't
- been integrated into the jump tables as of yet. But, using the -nojump is a lot better just because of size considerations.
-
-
- James
-
-