不是用预编译 头,加入下面的东西
Visual C++ linker complaints about undefined symbols.
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
Article ID#: 0007
Date: 4/7/97
Product: ST-Developer 1.5
Platform: Windows
Date: 4/7/97
Product: ST-Developer 1.5
Platform: Windows
Description of the problem
When linking a project, Visual C++ linker shows the following messages:
Linking...
rose.lib(IORose.obj) : error LNK2001: unresolved external symbol __pctype
rose.lib(IORose.obj) : error LNK2001: unresolved external symbol ___mb_cur_max
rose.lib(RoseServer.obj) : error LNK2001: unresolved external symbol _errno
p21.exe : fatal error LNK1120: 3 unresolved externals
Error executing link.exe.
When linking a project, Visual C++ linker shows the following messages:
Linking...
rose.lib(IORose.obj) : error LNK2001: unresolved external symbol __pctype
rose.lib(IORose.obj) : error LNK2001: unresolved external symbol ___mb_cur_max
rose.lib(RoseServer.obj) : error LNK2001: unresolved external symbol _errno
p21.exe : fatal error LNK1120: 3 unresolved externals
Error executing link.exe.
Explanation
The problem is due to the different definitions of these symbols in ROSE and MFC libraries.
Solution
To fix this problem add a new blank C++ source file to your project, and insert the following code into it:
extern "C"
{
int __mb_cur_max;
unsigned short* _pctype;
int errno;
}
To fix this problem add a new blank C++ source file to your project, and insert the following code into it:
extern "C"
{
int __mb_cur_max;
unsigned short* _pctype;
int errno;
}
Do not add anything else to this file.