This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: gcc-20001101 rejects legal c++ code


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
> 
> 
> 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]