mixing C and C++
Nathan Sidwell
nathan@codesourcery.com
Thu Oct 2 16:56:00 GMT 2003
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
More information about the Gcc-help
mailing list