This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
RE: Forcing gcc to compile c++ programs...?
- From: lrtaylor at micron dot com
- To: <millerj at wam dot umd dot edu>
- Cc: <gcc-help at gcc dot gnu dot org>
- Date: Mon, 15 Sep 2003 15:17:44 -0600
- Subject: RE: Forcing gcc to compile c++ programs...?
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