问题描述
我正在尝试在 Visual Studio 空 Windows 项目中使用 detours 库。我克隆了存储库 (https://github.com/microsoft/Detours),将包含目录添加到项目属性/C/C++/附加包含目录中,并将 lib.X86 目录添加到项目属性/链接器/附加库目录中。我在文件上看不到任何错误,但是当我构建时我得到
1>Source.cpp
1>Source.obj : error LNK2019: unresolved external symbol _DetourTransactionBegin@0 referenced in function _main
1>Source.obj : error LNK2019: unresolved external symbol _DetourTransactionCommit@0 referenced in function _main
1>Source.obj : error LNK2019: unresolved external symbol _DetourUpdateThread@4 referenced in function _main
1>Source.obj : error LNK2019: unresolved external symbol _DetourAttach@8 referenced in function _main
1>Source.obj : error LNK2019: unresolved external symbol _DetourDetach@8 referenced in function _main
1>Source.obj : error LNK2019: unresolved external symbol _DetourRestoreAfterWith@0 referenced in function _main
1>C:\Users\colel\source\repos\Project3\Debug\Project3.exe : Fatal error LNK1120: 6 unresolved externals
1>Done building project "Project3.vcxproj" -- Failed.
========== Build: 0 succeeded,1 Failed,0 up-to-date,0 skipped =========
看起来库没有正确包含。如何将 detours 库正确地包含到 Visual Studio 项目中,我做错了什么?