R
ruffiano
A colleague of mine who is a C developer wrote several functions in C
which I now need to invoke in my C++ application. This is normally not
a problem except that the header file that he wrote contains also
several structures and #defines, which I need to use in my C++
application.
What is the best way to use the C functions, structures and defines in
my code without upsetting the compiler / linker?
For the C functions I know I need to use extern "C" { ...}. But how do
I get to include the structures and the defines? If I include the
header file in my C++ code, then the linker will fail.
Any help is greatly appreciated.
Thanks.
which I now need to invoke in my C++ application. This is normally not
a problem except that the header file that he wrote contains also
several structures and #defines, which I need to use in my C++
application.
What is the best way to use the C functions, structures and defines in
my code without upsetting the compiler / linker?
For the C functions I know I need to use extern "C" { ...}. But how do
I get to include the structures and the defines? If I include the
header file in my C++ code, then the linker will fail.
Any help is greatly appreciated.
Thanks.