Windows Mobile 編譯錯誤解析:LNK2019: unresolved external symbol __GSHandlerCheck

來源:互聯網
上載者:User

一再看到有人在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就行了)。

 

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.