Forcing gcc to compile c++ programs...?

lrtaylor@micron.com lrtaylor@micron.com
Mon Sep 15 21:17:00 GMT 2003


Justin,

You _may_ also get by simply by linking to the standard C++ library (that's where the symbols it was complaining about are defined): -lstdc++.

Thanks,
Lyle Taylor

-----Original Message-----
From: Eljay Love-Jensen [mailto:eljay@adobe.com]
Sent: Monday, September 15, 2003 3:15 PM
To: Justin Miller
Cc: gcc-help@gcc.gnu.org
Subject: Re: Forcing gcc to compile c++ programs...?

Hi Justin,

That can vary depending on platform.

On my platform the g++...

g++ foo.cpp

...is equivalent to the gcc...

gcc -nostdlib -x c++ foo.cpp -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc crtend.o crtn.o

Likely, this will vary from platform to platform.

--Eljay



More information about the Gcc-help mailing list