编译Platform SDK程序出现问题
我正在尝试从这里编译示例;
http://msdn.microsoft.com/en-us /library/ms682619(VS.85).aspx
我已经安装了 Platform SDK,但遇到了这些错误;
Error 1 error LNK2019: unresolved external symbol _GetDeviceDriverBaseNameW@12 referenced in function _main DriverChecker.obj DriverChecker
Error 2 error LNK2019: unresolved external symbol _EnumDeviceDrivers@12 referenced in function _main DriverChecker.obj DriverChecker
Error 3 fatal error LNK1120: 2 unresolved externals C:\Files\Projects\VS2008\DriverChecker\Debug\DriverChecker.exe DriverChecker
有人知道如何正确编译吗?
I'm trying to compile the example from here;
http://msdn.microsoft.com/en-us/library/ms682619(VS.85).aspx
I've installed the Platform SDK, but I'm getting these errors;
Error 1 error LNK2019: unresolved external symbol _GetDeviceDriverBaseNameW@12 referenced in function _main DriverChecker.obj DriverChecker
Error 2 error LNK2019: unresolved external symbol _EnumDeviceDrivers@12 referenced in function _main DriverChecker.obj DriverChecker
Error 3 fatal error LNK1120: 2 unresolved externals C:\Files\Projects\VS2008\DriverChecker\Debug\DriverChecker.exe DriverChecker
Anyone any idea how to get this compiling correctly?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您只需在链接器选项中添加
psapi.lib
作为附加库即可。编辑项目的属性,导航到 Linker->Input,然后在显示“附加依赖项”的位置输入
"psapi.lib"
。You just need to add
psapi.lib
as an additional library in your linker options.Edit properties for your project, navigate to Linker->Input, and type
"psapi.lib"
where it says Additional Dependencies.