Wince 6.0下常見錯誤收集(不斷更新中)

來源:互聯網
上載者:User

1、Build: 0 succeeded or up-to-date, 0 failed, 1 skipped

     解決辦法:Check with the configuration manager like CMS said and make sure that you have the right platform set.

     最後解決辦法:系統編譯smartphone和pocket2003就ok,思量應該是選擇的平台出問題。最後發現選擇的wince6.0沒有安裝sdk,安裝了就好。

2、error LNK2019:unresolved external symbol *** referenced in function ***的解決方案

錯誤原因分析:

      當標頭檔中聲明了一個函數,但是在相應的源檔案中卻沒有對該函數進行定義,則會出現為“解決的外部符號”(unresolved external symbol )錯誤。

     另外,當一個函數調用了外部的一個庫檔案中的函數,但是在當前project的properties中並沒有將所依賴的(dependent)庫檔案包含進來時,也會出現這種錯誤。

      綜上,當一個solution在linking時找不到所涉及到的函數的定義時就會出現“unresolved external symbol ”錯誤。

      例如:

      調用bResult=NTLMEnumUser(i,user1[i],&in);

     雖然標頭檔包含了#include "ntlmssp.h"//user access manager

     由於沒有將ntlmssl.lib包含進來而導致的連結錯誤。

1>Linking...
1>LedControlDlg.obj : error LNK2019: unresolved external symbol NTLMEnumUser referenced in function "protected: virtual int __cdecl CLedControlDlg::OnInitDialog(void)" (?OnInitDialog@CLedControlDlg@@MAAHXZ)
      【解決方案】

      1. Project -> ** Properties... -> Configuration Properties -> Linker -> Input -> Additional Dependencies -> mil.lib

另外,在此之前,還需添加MIL庫的相應目錄:Tools -> Options -> Projects and Solutions -> VC++ Directories -> Show Directories for -> 在Include files中添加C:\Program Files\Matrox Imaging\Mil\Include  以及  Tools -> Options -> Projects and Solutions -> VC++ Directories -> Show Directories
for -> 在Library files中添加C:\Program Files\Matrox Imaging\Mil\LIB。添加目錄的目的是為了使VC在調用相應庫檔案時不必總是使用絕對位址,VC可以通過檔案名稱在所包含的目錄中進行搜尋。這樣,前面的mil.lib就不必使用絕對位址了。

      【缺點】可移植性差,如果將原工程中的源檔案和標頭檔中的內容copy下來重建立立該工程時(例如:在電子書或網路上找到的程式),仍需自己在工程中添加目錄及所需的庫檔案。

      2. 在程式前加入#pragma comment(lib, "mil.lib")也可以達到相同的效果。

      【優點】避免了方案1所出現的問題。

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.