I know this is a stupid question, but I have never had to mix them before and tought that there shold not be any problems. However I now have to do so, but compiler is throwing me an error:
cdpv.obj : error LNK2001: unresolved external symbol "void __cdecl FreeList(struct tagFILELIST *)" (?FreeList@@YAXPAUtagFILELIST@@@Z)
FreeList() is my function written in C.
Now, the problem is obvious: C and C++ uses different naming styles of functions. But I have added this code in my header file of C source to prevent such things:


#ifdef _cplusplus
extern "C" {
#endif

// Function declarations, structures, constants etc.

#ifdef _cplusplus
}
#endif
This header is included in both C and C++ code by the way.

Anyone know what's wrong? I'm using VC++ 6
Posted on 2004-05-30 08:01:23 by iwabee
it is __cplusplus instead of _cplusplus ;)

That's all:D
Posted on 2004-05-30 11:29:37 by ShortCoder
:eek: Thanks man! That helped.

Posted on 2004-05-30 13:13:38 by iwabee