Re: build error -- can not find operator new

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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?


regards,
George

----- Original Message ----
From: skaller <skaller@xxxxxxxxxxxxxxxxxxxxx>
To: Lin George <george4academic@xxxxxxxxx>
Cc: gcc-help@xxxxxxxxxxx
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++: http://felix.sf.net

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux