2014-11-01 20 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

相关问题