Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error LNK2001 when linking
Message
From
29/01/2002 04:36:25
 
 
To
28/01/2002 14:45:17
General information
Forum:
Visual C++
Category:
Debugging
Miscellaneous
Thread ID:
00611819
Message ID:
00612036
Views:
21
Stephane,

It sounds like your falling foul of C++ name mangling (or decorated names), this is where C++ compilers encode the names of C++ symbols to include type information in the name (for type safe linking) and can cause unresolved references.

This is a common problem when you are mixing C and C++ source code.

To see if this is causing your problem then you can wrapper your prototype definitions in the following statement, forcing the compiler to generate undecorated names.
// Wrap header files to prevent mangling.
extern "C"
{
#include "header1.h"
#include "header2.h"
}

// Wrap single prototypes
extern "C"
{
void SampleFunction(void);
}
HTH
Neil
Previous
Reply
Map
View

Click here to load this message in the networking platform