Re: Easy error compiling with gcc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux