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

  1. Newsgroups: comp.os.linux
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!darwin.sura.net!spool.mu.edu!yale.edu!ira.uka.de!fauern!Germany.EU.net!urmel.informatik.rwth-aachen.de!solaris.rz.tu-clausthal.de!news!voeckler
  3. From: voeckler@ipc1.rrzn.uni-hannover.de (Jens-S. Voeckler)
  4. Subject: [Q][GCC][G++] Using streams
  5. Message-ID: <1992Dec28.130803.25813@newsserver.rrzn.uni-hannover.de>
  6. Sender: news@newsserver.rrzn.uni-hannover.de (News Service)
  7. Organization: RVS, Universitaet Hannover, Germany
  8. X-Newsreader: Tin 1.1 PL4
  9. Date: Mon, 28 Dec 1992 13:08:03 GMT
  10. Lines: 46
  11.  
  12. I have encountered a problem when trying to compile a c++ program with
  13. g++. I am using SLS 0.98.5 distribution with the 0.99.0 kernel. Take a
  14. simple program like "asdf.cc":
  15.  
  16.     # include <stream.h>
  17.  
  18.     int main(void)
  19.     {
  20.       cout << "Hello world!\n";
  21.       return 0;
  22.     }
  23.  
  24. At first, I tried to compile using "g++ -o asdf asdf.cc":
  25.  
  26.     Undefined symbol _cout referenced from text segment
  27.     Undefined symbol operator...
  28.  
  29. Then I tried "g++ -o asdf asdf.cc -static". That does compile the
  30. program, but yields an executable with the ridiculous size of 75k!
  31.  
  32. A local guru suggested linking just the libg++ statically instead of
  33. using the "-lxxx" directive. That does not seem to work, either.
  34.  
  35. Another guru suggested getting the lig++ source and recompiling
  36. everything (I'm not a guru, how am I supposed to do that?). That
  37. does leave me with executables which may not run on other systems.
  38.  
  39.  
  40.  
  41. QUESTIONS
  42.  
  43. Is there any other option besides "-static"? What do I have to do to
  44. get it translated? Do I miss sym-links? libraries? compiler
  45. directives? Does translating libg++ help? Did anyone do so? Where
  46. would I get it? Will Peter include something in the like of streams
  47. into the next SLS distribution?
  48.  
  49. Thanx, Jens
  50.  
  51. --
  52. Ciao            InterNet : voeckler@rvs.uni-hannover.dbp.de
  53. Jens-S. V"ockler    e-mail   : voeckler@ipc1.rrzn.uni-hannover.de
  54. all opinions expressed are my *ultra*-own and have nothing to do with
  55. the rvs, rrzn, or other stuff'n'staff connected to these institutions.
  56.  
  57. HELLO!  I'm a .signature virus! Join in and copy me into yours! #@2!*
  58.