boost - 需要在Visual Studio中编译缺少的 `detour 3.0`库

标签 boost visual-studio-2013 compiler-errors visual-studio-2019 detours

我将在Visual Studio 2013或Visual Studio 2019中编译旧项目(Visual Studio 2012 Platform-v110xp)。
它使用了boost和Microsoft detour 3.0库。
但是detour 3.0已被意外删除。
现在我只能找到detour4.0
但我收到这样的错误
detour4.0 error
我如何获得detour 3.0库?

最佳答案

使用VS 2015,VS 2017或VS 2019构建的C++静态库是“二进制兼容的”,但是Visual C++的任何其他版本都不是。例如,当与VS 2013代码链接时,与VS 2012链接的静态库不一定有效。参见Microsoft Docs
我不知道确切涉及哪些工具集,但这可能是链接问题的原因。最主要的是确保所有静态库和主要可执行文件均由同一编译器版本构建。

Note that DLLs and their export libraries typically use only "C-style" binding so they can be binary compatible with multiple generations of compilers.


VS 2019包含v141_xp平台工具集(即使用与Windows XP/Windows Server 2003兼容的Windows 7.1A SDK的VS 2017编译器)。

关于boost - 需要在Visual Studio中编译缺少的 `detour 3.0`库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64745178/

相关文章:

c++ - 如何重载 operator new 和 delete 来跟踪内存?

c++ - 从 Windows building .o 但不是 .a 交叉编译 Boost for GCC ARM (Linux)

javascript - TypeScript 编译导致依赖错误

ASP.NET 在 Master 中更新元素?

ios - Mach-O 链接器错误 - 文件已正确导入(并检查)但仍然出错?

c++ - 在 Visual Studio 2017 C++ 项目中 boost C++ 库 - "Cannot open include file"

visual-studio - Azure 模拟器连接错误

visual-studio-2013 - 如何在 dacpac 中为部署后脚本创建日志?

c++ - 使用数据库结构的简单程序中未声明的标识符错误

c++ - 检查数据是否到达 OK