This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: mixing C and C++


Eljay Love-Jensen wrote:
Hi Frank,

The scenario you describe should work just fine, given that you are extern "C"-ing, compiling and linking appropriately.

I have a code base with 17,000 source files, some C, some C++ ... and I haven't had any issues with the mixed C/C++ environment.

You should compile the file containing 'main' and link the program with g++. On some systems that is not necessary, it may or may not be on yours.

nathan

--
Nathan Sidwell    ::   http://www.codesourcery.com   ::     CodeSourcery LLC
         The voices in my head said this was stupid too
nathan@codesourcery.com    ::     http://www.planetfall.pwp.blueyonder.co.uk



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]