This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: build error -- can not find operator new
- From: Lin George <george4academic at yahoo dot com>
- To: skaller <skaller at users dot sourceforge dot net>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Mon, 5 Nov 2007 04:03:40 -0800 (PST)
- Subject: 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?
regards,
George
----- Original Message ----
From: skaller <skaller@users.sourceforge.net>
To: Lin George <george4academic@yahoo.com>
Cc: gcc-help@gcc.gnu.org
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