home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / sys / amiga / programm / 12462 < prev    next >
Encoding:
Text File  |  1992-08-19  |  2.1 KB  |  53 lines

  1. Path: sparky!uunet!kithrup!hoptoad!decwrl!mips!darwin.sura.net!Sirius.dfn.de!zrz.tu-berlin.de!news.netmbx.de!Germany.EU.net!mcsun!uknet!yorkohm!minster!stuart
  2. From: stuart@minster.york.ac.uk
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Link problem with GCC 2.2.2
  5. Message-ID: <714220606.23897@minster.york.ac.uk>
  6. Date: 19 Aug 92 10:36:48 GMT
  7. Organization: Department of Computer Science, University of York, England
  8. Lines: 43
  9.  
  10.  
  11. I can't get the latest version of GCC (2.2.2, ftp'd from wuarchive) to
  12. successfully compile a C++ program which uses streams, the compilation
  13. phase seems to be successful but the linking phase fails with a reference
  14. to an undefined symbol ___new_handler.
  15.  
  16. The problem is demonstrated by a simple "Hello World" program:
  17.  
  18.     #include<iostream.h>
  19.     int main()
  20.     {
  21.       cout<<"Hello World\n";
  22.     }
  23.  
  24. Which gives the following error:
  25.  
  26. gcc:lib/libgcc.a(_builtin_new.o): Undefined symbol ___new_handler referenced
  27. from text segment
  28.  
  29. The output (using the `-v' switch to gpp.rexx) is as follows:
  30.  
  31. Reading specs from gcc:compilers/amiga/2.2.2/specs
  32. gcc version 2.2.2
  33.  gcc:compilers/amiga/2.2.2/cpp -lang-c++ -v -undef -D__GNUC__=2 -D__GNUG__=2 
  34.  -D__cplusplus -Dmc68000 -Damiga -Damigados -DMCH_AMIGA -DAMIGA -D__mc68000__ 
  35.  -D__amiga__ -D__amigados__ -D__MCH_AMIGA__ -D__AMIGA__ -D__mc68000 -D__amiga 
  36.  -D__amigados -D__MCH_AMIGA -D__AMIGA -Dmc68010 hello.cc t:cc123008.i
  37. GNU CPP version 2.2.2 (68k, MIT syntax)
  38.  gcc:compilers/amiga/2.2.2/cc1plus t:cc123008.i -quiet -dumpbase hello.cc 
  39.  -version -o t:cc123008.s
  40. GNU C++ version 2.2.2 (68k, MIT syntax) compiled by GNU C version 2.2.2.
  41.  gcc:compilers/amiga/2.2.2/as -mc68010 -o hello.o t:cc123008.s
  42.  gcc:compilers/amiga/2.2.2/ld gcc:lib/crt0.o -Lgcc:compilers/amiga/2.2.2 
  43.  -Lgcc:lib hello.o -lg++ -lgcc -lc -lgcc
  44. gcc:lib/libgcc.a(_builtin_new.o): Undefined symbol ___new_handler refer
  45. enced from text segment
  46.  
  47. Any ideas what the problem is? The systems is a B2000, with WB2.04 and a
  48. GVP 68030 board with 4Mb 32bit RAM. All libraries (shared and link) and
  49. C++ include files are those supplied with Gcc 2.2.2.
  50.  
  51. Stuart
  52. (stuart@minster.york.ac.uk)
  53.