Easy error compiling with gcc
Eljay Love-Jensen
eljay@adobe.com
Wed Aug 31 15:00:00 GMT 2005
Hi Robe,
It's best to compile/link C++ with the C++ compiler/linker g++, rather than
compile/link C++ with the C compiler/linker gcc. (I think gcc and g++ are
technically referred to as tool-chain drivers.)
It is possible to use gcc to compile and link C++. The details of which
will vary depending on your platform and your version of GCC. Which makes
any solution you create to use gcc very sensitive to both of those factors.
If you still really want to go ahead with this scheme, please note that I
consider it ill-advised. Use g++ -v to see what magic happens behind the
scenes with g++, then replicate that same magic with gcc (using gcc -v).
And be caveat forewarned that your gcc-driven solution will be very fragile,
GCC version specific, and platform specific.
Sincerely,
--Eljay
More information about the Gcc-help
mailing list