Mail Archives: djgpp/1998/04/01/23:49:48
At 02:25 4/1/1998 +0800, VAMPYR wrote:
>As title.
>I heard GCC is C compilier, GXX is C++ compilier,
>but why I can use C++ class parse in GCC.EXE ?
The `gcc' program determines whether your program is C or C++ by the
extension, so you technically can compile both C and C++ with it. The
trouble occurs when you link: C++ programs usually need to be linked with a
C++ library. The compiler driver can't figure this out itself, since there's
no visible distinction between C and C++ object files, so you have to tell
it by adding `-lstdcxx' and such to the command line. `gxx' is just a
wrapper program that does this for you and calls gcc. It could conceivably
be written as a shell script like this:
Nate Eldredge
eldredge AT ap DOT net
- Raw text -