Re: Does g++ really need to compile main, if c++ code is involved?

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

 




On 3/20/2014 4:27 AM, Eric Wolf wrote:

We have a big bunch of C and C++ code in our product and compile
main with g++, because I read in

http://www.parashift.com/c++-faq/overview-mixing-langs.html

that this is needed.


The proper compile mode will be selected regardless of whether you invoke gcc, g++, gfortran, ... e.g. according to the file name. As your reference pointed out, that is not true of many other compilers. The second point in that reference is valid: g++ includes -lstdc++ implicitly, which the other languages do not, so that g++ references can be satisfied during linking.

--
Tim Prince





[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