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]

Help : Linking C and C++ code



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++.



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