public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Forcing gcc to compile c++ programs...?
@ 2003-09-15 19:49 Justin Miller
  2003-09-15 19:58 ` Eljay Love-Jensen
  0 siblings, 1 reply; 9+ messages in thread
From: Justin Miller @ 2003-09-15 19:49 UTC (permalink / raw)
  To: gcc-help

How can I force gcc to compile a c/c++ program that has a c-style
extension w/o changing that extension??

Justin Miller

^ permalink raw reply	[flat|nested] 9+ messages in thread
* RE: Forcing gcc to compile c++ programs...?
@ 2003-09-15 21:17 lrtaylor
  0 siblings, 0 replies; 9+ messages in thread
From: lrtaylor @ 2003-09-15 21:17 UTC (permalink / raw)
  To: millerj; +Cc: gcc-help

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2003-09-15 21:17 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-15 19:49 Forcing gcc to compile c++ programs...? Justin Miller
2003-09-15 19:58 ` Eljay Love-Jensen
2003-09-15 20:05   ` Justin Miller
2003-09-15 20:09     ` Eljay Love-Jensen
2003-09-15 20:28       ` Justin Miller
2003-09-15 20:31         ` Eljay Love-Jensen
2003-09-15 20:35           ` Justin Miller
2003-09-15 21:15             ` Eljay Love-Jensen
2003-09-15 21:17 lrtaylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).