Windows Mobile 编译错误解析:LNK2019: unresolved external symbol __GSHandlerCheck

一再看到有人在CSDN论坛上面问, 我的PPC/SMARTPHONE的SDK example为什么编译不过,我没有做过任何的修改啊!然后出现的错误都是类似的 LNK2019: unresolved external symbol __GSHandlerCheck 的错误,然后出了错误, 大抵都失去了对Microsoft的信任:)那问题的缘由处在什么地方呢?其实在MSDN Blog上面有对于类似问题的说明一下的信息出自:http://blogs.msdn.com/mgaur/archive/2006/12/21/lnk2019-unresolved-external-symbol-gshandlercheck.aspx  有兴趣的话可以点击去看看详细。

 

If you're a native C++ smart device developer and recently downloaded VS2005 SP1 you may find that some of your existing programs and some of the samples that ship with Windows Mobile SDK will fail to compile. Even if you're able to make them compile they may issue a warning like "warning LNK 4099: PDB 'libbmt.pdb was not found".

This is because VSD has updated the compilers for VS2005 SP1 to be on par with WinCE 6 compilers which included /GS support. So, for projects that don’t include libc/msvcrt or turn off /GS, you will run into these errors on pre-WinCE 6 platforms

As a workaround you should explicitly include "libcmt.lib" in the list of additional libs to link against and turn off the linker warning (/nowarn:4099).

 

这里已经说的很清楚了, VS2005在安装了SP1以后,那些没有显示link libcmt.lib或者没有关闭/GS编译选项的都有可能碰到如此的错误,解决办法就是显示地去link libcmt.lib就可以了。(就是在Linker=>Input=>Additional Dependencies里面添加libcmt.lib就行了)。

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值