This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Help : Linking C and C++ code
- To: <gcc-help at gcc dot gnu dot org>
- Subject: Help : Linking C and C++ code
- From: "Ujval Lodha" <ujval at gdc-tech dot com>
- Date: Sat, 10 Nov 2001 14:52:49 +0800
Hi
I am trying to link some C code with C++ code. The compiler returns with
=93undefined reference to <function>=94 for the function written in the
C++ file.
Please advise on how to call a C++ function from a C program and link
the two.
Regards Ujval
Note: The C code are in pre-ansi style, so I am unable to compile them
with g++, and the C++ files need to be compiled with g++.