R
Randy Yates
I have a library (let's call it "mylib") that is written and compiled
using C which I would like to use with both C and C++ applications.
The problem is that if I add the "extern "C"" construct in front of
the function prototypes in mylib.h, then when mylib.o is built using
the C compiler this keyword is not recognized (since mylib.c also
includes mylib.h) and the compiler barfs with errors.
Is there a good solution to this problem?
using C which I would like to use with both C and C++ applications.
The problem is that if I add the "extern "C"" construct in front of
the function prototypes in mylib.h, then when mylib.o is built using
the C compiler this keyword is not recognized (since mylib.c also
includes mylib.h) and the compiler barfs with errors.
Is there a good solution to this problem?