home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 3201 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.4 KB

  1. Path: scms.rgu.ac.uk!krypton!cs2lk
  2. From: cs2lk@scms.rgu.ac.uk (Lee Kindness)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: Problems compiling gcc
  5. Date: 8 Feb 1996 14:18:34 GMT
  6. Organization: The Robert Gordon University, School of Computer and Mathematical Sciences, Aberdeen, Scotland
  7. Message-ID: <4fd0nq$1h3@roadkill.scms.rgu.ac.uk>
  8. References: <4fce90$8bj@due.unit.no>
  9. NNTP-Posting-Host: cs2lk%@krypton.scms.rgu.ac.uk
  10. X-Newsreader: TIN [version 1.2 PL2]
  11.  
  12. Atle \ystein Pedersen (atlep@alkymi.unit.no) wrote:
  13. : I've installed GnuC++ and tried to compile a simple prog..
  14. : Here's the situation as viewed from a shell..
  15.  
  16. : 0 Serious:C/Test > type test.cpp
  17.  
  18. : #include <iostream.h>
  19. : #include <stdio.h>
  20.  
  21. : int main(int argc, char **argv)
  22.  
  23. : {
  24. :         printf("Hello World!\n");
  25. :         cout << "Hello world\n";
  26. :         return 0;
  27. : }
  28. : 0 Serious:C/Test > gcc -c test.cpp
  29. : 0 Serious:C/Test > gcc  test.cpp
  30. : /t/cc9981921.o: Undefined symbol _cout referenced from text segment
  31. : /t/cc9981921.o: Undefined symbol _  ls_ 7ostreamPCc referenced from text
  32. : segment
  33. : 0 Serious:C/Test >
  34.  
  35. : I.e making a .o file is no problem, but linking it causes errors...
  36. : Does anyone know what the problem might be?
  37.  
  38. Try:
  39.  
  40. > g++ -c test.cpp
  41. > g++ test.o
  42.  
  43.  
  44. --
  45. \ Lee Kindness
  46.  \ wangi@frost3.demon.co.uk
  47.   \ cs2lk@scms.rgu.ac.uk
  48.    \ Current projects - Satchmo's Mailbag, GFindXXX, Umentiler...
  49.     \=> Founder Team TRUMPET ;)
  50.  
  51.