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就行了)。

 

你可能感兴趣的:(windows,Microsoft,mobile,include,dependencies,linker)