home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 3357 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.2 KB  |  35 lines

  1. Newsgroups: comp.sys.amiga.programmer
  2. Path: fuw.edu.pl!cyfronet!student!iskra
  3. From: iskra@student.uci.agh.edu.pl (Kamil Iskra)
  4. Subject: Re: Problems compiling gcc
  5. Message-ID: <DMIE2v.9Hs@cyf-kr.edu.pl>
  6. Sender: news@cyf-kr.edu.pl (News Administrator)
  7. Nntp-Posting-Host: student.uci.agh.edu.pl
  8. Organization: Academic Computer Centre, CYFRONET
  9. X-Newsreader: TIN [version 1.1 PL8]
  10. References: <4fce90$8bj@due.unit.no>
  11. Date: Fri, 9 Feb 1996 12:44:55 GMT
  12.  
  13. Atle \ystein Pedersen (atlep@alkymi.unit.no) wrote:
  14. > int main(int argc, char **argv)
  15.  
  16. > {
  17. >         printf("Hello World!\n");
  18. >         cout << "Hello world\n";
  19. >         return 0;
  20. > }
  21. > 0 Serious:C/Test > gcc -c test.cpp
  22. > 0 Serious:C/Test > gcc  test.cpp
  23. > /t/cc9981921.o: Undefined symbol _cout referenced from text segment
  24. > /t/cc9981921.o: Undefined symbol _  ls_ 7ostreamPCc referenced from text
  25. > segment
  26.  
  27. You should use "g++" for compiling C++ programs, not gcc. ("g++" just
  28. invokes "gcc" with "-lg++ -lstdc++" options). 
  29.  
  30. --
  31. / Kamil Iskra - AMIGA 1200, 68030 50MHz, HDD 850 MB, 10 MB RAM \
  32. | iskra@student.uci.agh.edu.pl  kiskra@ernie.icslab.agh.edu.pl |
  33. | http://student.uci.agh.edu.pl/~iskra                         |
  34. \ PGP public key available via Finger or WWW                   /
  35.