c++ - 为 Visual Studio 2017 构建 boost 1.64

标签 c++ boost visual-studio-2017

我无法在 VS2017 中使用 boost 1.64 库。 在这里编译如下:

b2 toolset=msvc-14.1 --build-dir=.x86 --stagedir=stage_x86

在工作室我遇到这样的错误:

Error   unresolved external symbol "class boost::system::error_category const & __cdecl boost::system::system_category(void)" (?system_category@system@boost@@YAABVerror_category@12@XZ)

我现在不知道该怎么办。 我试图编译 64 位并使用它。 --> 有相应的错误。好的。 我这样编译:

b2

完全一样的错误。

Error   unresolved external symbol "class boost::system::error_category const & __cdecl boost::system::system_category(void)" (?system_category@system@boost@@YAABVerror_category@12@XZ)

所有项目链接器选项:

/OUT:"E:\Yandex.Disk\Projects\OS\Release\OS.exe" /MANIFEST /LTCG:incremental /NXCOMPAT /PDB:"E:\Yandex.Disk\Projects\OS\Release\OS.pdb" /DYNAMICBASE "kernel32.lib" "user32.lib" "gdi32.lib" "winspool.lib" "comdlg32.lib" "advapi32.lib" "shell32.lib" "ole32.lib" "oleaut32.lib" "uuid.lib" "odbc32.lib" "odbccp32.lib" /DEBUG:FULL /MACHINE:X86 /OPT:REF /SAFESEH /INCREMENTAL:NO /PGD:"E:\Yandex.Disk\Projects\OS\Release\OS.pgd" /SUBSYSTEM:CONSOLE /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /ManifestFile:"Release\OS.exe.intermediate.manifest" /OPT:ICF /ERRORREPORT:PROMPT /NOLOGO /LIBPATH:"E:\boost_1_64_0\stage_x86\lib" /TLBID:1 

最佳答案

据我了解,Microsoft 为简化 VS2017 部署所做的更改导致 Boost Build 如何检测构建 Boost 所需的工具集的严重问题。我的猜测是这是阻止官方支持和/或导致问题的原因。截至 2017 年 4 月,很明显检测 VS2017 仍然存在问题 - 例如参见 https://github.com/boostorg/build/issues/157http://boost.2283326.n4.nabble.com/VS2017-release-vswhere-exe-td4693141.html#a4693313 .一线希望是微软意识到并似乎致力于解决这个问题。参见 https://lists.boost.org/Archives/boost/2017/04/234552.php .

在线信息表明存在使用 Powershell 的工作轮次,但至少可以说是非常重要的。建议等待此问题的任何人关注讨论,并向 Microsoft 表达为 Boost 1.65.0 解决此问题的紧迫性。我还没有亲自尝试此操作 (notNeeded & notEnoughTime),但我对解决方案非常感兴趣,如果看起来已得到妥善解决,我会回来更新。

关于c++ - 为 Visual Studio 2017 构建 boost 1.64,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43552068/

相关文章:

c++ - 在char数组中定位 double (C++/ROOT)

c++ - 使用某个宏时如何禁止调用特定函数

c++ - 将 boost::posix_time::time_duration boost 为字符串

git - Visual Studio 想要克隆我的 GIT 存储库(当它已经存在时)

f# - 如何在 Visual Studio 2017 RC 中创建 F# .Net Core ConsoleApp

c++ - 如何分配一个二维 vector ?

c++ - 从 WAV 文件中获取实际值 C++

c++ - 在带有 std::vectors 的 boost::spirit 中使用 auto_ 表达式

c++ - 一次性使用 Boost.MPL 定义标签和序列

c++ - 修改内存区域 - 返回 0xCC VC++