On Fri, 6 Jun 2003 15:58:09 +0800
Verdi March
Hi,
Is there any special steps to link a *.cpp to a library created and compiled with C compiler?
I have a class that calls a C function in an existing library (libXX.so). This library is written in C. I got the following error while compiling, and I think it happens during linking: Make sure that the prototype for the function you are calling is declared as a C function (as an example): #if defined __cplusplus extern "C" { int foo(int a, int b); } #endif /* __cplusplus */ Most of the standard C functions are already taken care of when including things like <cstdio>.
--
Jerry Feldman