home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / os / linux / 22127 < prev    next >
Encoding:
Text File  |  1992-12-30  |  1.4 KB  |  32 lines

  1. Newsgroups: comp.os.linux
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!cs.utexas.edu!torn!watserv2.uwaterloo.ca!mach1!kfisher3
  3. From: kfisher3@mach1.wlu.ca (kevin fisher U)
  4. Subject: Re: G++:where is the c++ library? I couldn't link c++ program.
  5. X-Newsreader: TIN [version 1.1 PL6]
  6. References: <1992Dec28.134302.12378@news.ysu.edu>
  7. Message-ID: <C026Gw.Cqq@mach1.wlu.ca>
  8. Organization: Wilfrid Laurier University
  9. Date: Wed, 30 Dec 1992 06:10:07 GMT
  10. Lines: 20
  11.  
  12. Weijin Mai (ah214@yfn.ysu.edu) wrote:
  13. :     I compiled the C++ program and produced an object file. The problem is
  14. : I couldn't link it with the appropiate c++ library. My program uses cout and
  15. : cin and the linker doesn't find the library for these two functions. I used
  16. : the -llibrary switch and tried out all the library in usr/lib without success.
  17. : Why can't g++/gcc determine the library it needs from header file?[D[
  18. : What is the library for iostream.h?
  19.  
  20. I had this problem, and someone kindly enlightened me, so I will enlighten
  21. you--compile using the -static option.  All your woes will end.
  22. The samaritan that helped me said it was because gcc can only use the static
  23. libraries or something.
  24.  
  25.  
  26. -- 
  27. --------------------------------------------------------------------------------
  28. Kevin Fisher  ><>     |  "Thank you.  You can't believe everything you
  29. kfisher3@mach1.wlu.ca   |  see and hear, can you?" - Hendrix, 'EXP'
  30. ________________________________________________________________________________
  31.