This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
RE: gcc-20001101 rejects legal c++ code
- To: 'Al Elgert' <elgert at rbg dot informatik dot tu-darmstadt dot de>
- Subject: RE: gcc-20001101 rejects legal c++ code
- From: Jan Reimers <janr at molienergy dot com>
- Date: Mon, 6 Nov 2000 12:59:40 -0800
- Cc: "'gcc-bugs at gcc dot gnu dot org'" <gcc-bugs at gcc dot gnu dot org>
Compile with g++ instead of gcc. This will automatically link in the
correct C++ libraries.
JR
> -----Original Message-----
> From: Al Elgert [mailto:elgert@rbg.informatik.tu-darmstadt.de]
> Sent: Monday, November 06, 2000 12:42 PM
> To: gcc-bugs@gcc.gnu.org
> Subject: gcc-20001101 rejects legal c++ code
>
>
> Hi
>
> PROBLEM
> I tried to compile this simple Code
>
> main() { int *a=new int; }
>
> but the compiler refused to work:
>
> Undefined first referenced
> symbol in file
> __builtin_new /var/tmp/cc7CC8gJ.o
> ld: fatal: Symbol referencing errors. No output
> written to a.out
> collect2: ld returned 1 exit status
>
> ENVIRONMENT
> I compiled this gcc on sparc-sun-solaris2.7 with no
> special options
> (configure --prefix...; make bootstrap; make install).
>
> The following gcc's versions are affected:
> egcs-20001009
> egcs-20001016
> egcs-20001023
> egcs-20001030
> gcc-20001101
>
> ATTACHMENT
> the output of the following command:
> gcc -v -save-temps all-your-options source-file
> in my case:
> gcc -v -save-temps foo.cxx
>
>
> greetings
> Alexander
>
>
>