I am trying to port some C code in a C++ project using the MS Visual C++
6.0
One of the problems I am facing is the following:
When the linker finds a call in a cpp file to a functions whose
definition is in a c file,
it cannot resolve the function symbol and it generates a fatal error.
for example consider that the "exam.c" file contains the following
definition
int exam(){
return 0;
}
and a statement in the "test.cpp" file calls this function as
int x=exam();
then the linker finds an unresolved symbol in "test.obj" producing the
following error
error LNK2001: unresolved external symbol "int __cdecl exam(void)"
(?exam@@YAHXZ)
Howeer, the linker does not find unresolved symbol when I call the
function from another c file
Do any of you have any idea why this happens and how I can make it to
work?
Thanks in advance
Best regards
Vangelis