有誰知道這意味着什麼?C++無法解析的外部信息
1> Generating Code...
1>BlankWindowDXbaseImpl.obj : error LNK2019: unresolved external symbol "public: __thiscall DXBase::DXBase(void)" ([email protected]@[email protected]) referenced in function "public: __thiscall BlankWindowDXBaseImpl::BlankWindowDXBaseImpl(void)" ([email protected]@[email protected])
1>BlankWindowDXbaseImpl.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall DXBase::~DXBase(void)" ([email protected]@[email protected]) referenced in function "public: virtual __thiscall BlankWindowDXBaseImpl::~BlankWindowDXBaseImpl(void)" ([email protected]@[email protected])
1>main.obj : error LNK2019: unresolved external symbol "public: void __thiscall DXBase::shutdown(void)" ([email protected]@@QAEXXZ) referenced in function [email protected]
1>main.obj : error LNK2019: unresolved external symbol "public: bool __thiscall DXBase::initalize(struct HINSTANCE__ *,struct HWND__ *)" ([email protected]@@[email protected]@[email protected]@@Z) referenced in function [email protected]
1>C:\backup\development\directXworkspace\BlankWindow\Debug\BlankWindow.exe : fatal error LNK1120: 4 unresolved externals
你是對的,鏈接器找不到正確的lib。但是,在VS2010中,我將lib路徑設置爲包含所需lib的路徑。它根本就不會找到它。我剛剛厭倦了,並將類和頭移到同一個項目中,所以它在本地找到了lib。 – Sublimemm
顯然你做得不對,因爲這是正常的事情。在光顧的風險中,您需要1)將庫目錄添加到「常規/附加庫目錄」中2)將庫本身添加到「輸入/附加依賴關係」3)請參考.lib時不要忘記.lib庫在第2步。 – john