This is the mail archive of the 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]
Other format: [Raw text]

Re: build error -- can not find operator new

Thanks John,

I want to confirm with you that,

1. if the extension name is .cpp (or .cxx), then even if we invoke command gcc, g++ will be used;
2. if the extension name is .c and even if we invoke g++, then the code will be compiled as C binary other than C++ binary (and at the same time, C system shared lib will be linked, other than C++ system shared lib).

Are both (1) and (2) correct?


----- Original Message ----
From: skaller <>
To: Lin George <>
Sent: Monday, November 5, 2007 7:17:00 PM
Subject: Re: build error -- can not find operator new

On Mon, 2007-11-05 at 02:35 -0800, Lin George wrote:
> Hi John,
> One more comment to your solution, 
> I want to confirm that for the trivial 
> C++ program you mentioned below. We should build it with g++ other than gcc, right? 

Yes, however make sure the extension (cxx or cpp) reflects the
language since g++ will compile *.c files as C not C++.

John Skaller <skaller at users dot sf dot net>
Felix, successor to C++:

Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

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