I have a c-library which I use in gcc. The library has the extension .lib but is always linked as a static library. If i write a program which uses the library as c-code, ev
Does your header file have the usual
#ifdef __cplusplus extern "C" { #endif // ... #ifdef __cplusplus } /* extern "C" */ #endif
to give the library functions C linkage explicitly.
.cpp files are compiled with C++ linkage i.e. name mangling by default.