This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
RE: mixing C and C++
- From: lrtaylor at micron dot com
- To: <telfsig at yahoo dot com>, <gcc-help at gcc dot gnu dot org>
- Date: Thu, 2 Oct 2003 10:18:07 -0600
- Subject: RE: mixing C and C++
This may have no bearing on your problem (which sounds probably like a coding issue to me), but I would think that if you're calling a C++ function from your file containing main, then you're really compiling C++ code in your "main" file rather than C code - even if everything else is C code. I would compile any file using or calling C++ code with g++ instead of gcc.
Cheers,
Lyle
-----Original Message-----
From: Frank Signorelli [mailto:telfsig@yahoo.com]
Compile a main function in a *.c file using gcc.
?
compile function "foo" in a *.cpp file using g++.
?
compile function "bar" in a *.c file using gcc.
?
main invokes foo which invokes bar.