Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

MSVisual C++ calling Convention

0 views
Skip to first unread message

Evangelos Kotsakis

unread,
Aug 30, 1999, 3:00:00 AM8/30/99
to
Hi!

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

0 new messages