2014-11-01 80 views
1

鏈接給我在Inject_mod.obj文件調用一個致命的錯誤:鏈接錯誤:無法解析的符號,當圖書館正式列入

[email protected]

[email protected]

那是我ntdll.h我定義外部添加到我的項目中。但好像編譯器/連接不知何故沒有看出來,等

使用:Project Explorer樹中:http://floomby.ru/s2/setKB5 VC 2013年Win8.1,項目最初在Win7的

Here's linker error and function definition in header

UPD創建。如果有信心,有些詞語已經模糊了。額外的依賴包含我的外部ntdll.h導致ntdll.lib

+0

能否請您擴展到全英文句子。 – 2014-11-01 11:42:24

+1

我不確定只要將* .lib添加到項目中就是您應該做的。您應該將其添加到項目設置中的鏈接器依賴項,而不是 – PeterT 2014-11-01 11:44:46

+0

[可能的重複[什麼是未定義的引用/未解析的外部符號錯誤,以及如何解決它?](http://stackoverflow.com/questions/12573816/ what-is-an-undefined-reference-unresolved-external-symbol-error-and-how-do-i-fix) – GSerg 2014-11-01 11:50:10

回答

1

只能在Visual Studio中的解決方案視圖中複製lib文件。

您需要在連接器Input->Additional Dependencies窗格中添加ntdll.lib或任何靜態庫依賴項。

既然你想使用NtQuerySystemInformationbe aware that

[NtQuerySystemInformation may be altered or unavailable in future versions of Windows. Applications should use the alternate functions listed in this topic.]

+0

當然,我已將它添加到鏈接器中。感謝您的鏈接。但是我有我自己的ntdll.lib,其中NtQuerySystemInformation被廣泛定義。它應該工作,不是嗎? – mechanic 2014-11-01 12:50:08

+0

檢查您使用的簽名並確保它們匹配 – 2014-11-01 13:51:49

相關問題