home *** CD-ROM | disk | FTP | other *** search
- 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
- From: stuart@minster.york.ac.uk
- Newsgroups: comp.sys.amiga.programmer
- Subject: Link problem with GCC 2.2.2
- Message-ID: <714220606.23897@minster.york.ac.uk>
- Date: 19 Aug 92 10:36:48 GMT
- Organization: Department of Computer Science, University of York, England
- Lines: 43
-
-
- I can't get the latest version of GCC (2.2.2, ftp'd from wuarchive) to
- successfully compile a C++ program which uses streams, the compilation
- phase seems to be successful but the linking phase fails with a reference
- to an undefined symbol ___new_handler.
-
- The problem is demonstrated by a simple "Hello World" program:
-
- #include<iostream.h>
- int main()
- {
- cout<<"Hello World\n";
- }
-
- Which gives the following error:
-
- gcc:lib/libgcc.a(_builtin_new.o): Undefined symbol ___new_handler referenced
- from text segment
-
- The output (using the `-v' switch to gpp.rexx) is as follows:
-
- Reading specs from gcc:compilers/amiga/2.2.2/specs
- gcc version 2.2.2
- gcc:compilers/amiga/2.2.2/cpp -lang-c++ -v -undef -D__GNUC__=2 -D__GNUG__=2
- -D__cplusplus -Dmc68000 -Damiga -Damigados -DMCH_AMIGA -DAMIGA -D__mc68000__
- -D__amiga__ -D__amigados__ -D__MCH_AMIGA__ -D__AMIGA__ -D__mc68000 -D__amiga
- -D__amigados -D__MCH_AMIGA -D__AMIGA -Dmc68010 hello.cc t:cc123008.i
- GNU CPP version 2.2.2 (68k, MIT syntax)
- gcc:compilers/amiga/2.2.2/cc1plus t:cc123008.i -quiet -dumpbase hello.cc
- -version -o t:cc123008.s
- GNU C++ version 2.2.2 (68k, MIT syntax) compiled by GNU C version 2.2.2.
- gcc:compilers/amiga/2.2.2/as -mc68010 -o hello.o t:cc123008.s
- gcc:compilers/amiga/2.2.2/ld gcc:lib/crt0.o -Lgcc:compilers/amiga/2.2.2
- -Lgcc:lib hello.o -lg++ -lgcc -lc -lgcc
- gcc:lib/libgcc.a(_builtin_new.o): Undefined symbol ___new_handler refer
- enced from text segment
-
- Any ideas what the problem is? The systems is a B2000, with WB2.04 and a
- GVP 68030 board with 4Mb 32bit RAM. All libraries (shared and link) and
- C++ include files are those supplied with Gcc 2.2.2.
-
- Stuart
- (stuart@minster.york.ac.uk)
-