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所出現的問題。