errno 2019错误

本文解决Visual C++链接器报告未定义符号的问题,通过添加空白C++源文件并声明特定全局变量来避免不同库之间的冲突。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

不是用预编译 头,加入下面的东西
Visual C++ linker complaints about undefined symbols.
--------------------------------------------------------------------------------
Article ID#: 0007
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.

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;
}
Do not add anything else to this file.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值