How do you link a C++ program to C functions

By using the extern "C" linkage specification around the C function declarations.
You should know about mangled function names and type-safe linkages. Then you should King of Heartsexplain how the extern "C" linkage specification statement turns that feature off during compilation so that the linker properly links function calls to C functions. Another acceptable answer is "I don't know. We never had to do that." Merely describing what a linker does would indicate to me that you do not understand the issue that underlies the question.

No comments: