Stackoverflow won't let me comment because I am a newbie.
Borrowing the title from the question posted here, the accepted solution says that you have to modify the C header file using #ifdef __cplusplus
and extern "C"
.
I have the exact same question but I have been provided a C library containing over 100 .h
C header files and .c
C program files and now I have to use a C++ library so my main()
will be in C++.
So do I now have to add those modifications to each one of those C header files or is there some other approach? My main()
is in a .cpp
file which will use functions from this C library.
EDIT This question has been resolved. I wish for this question to be closed or removed.