c++ - vs2010 上的 Boost Process 错误

标签 c++ visual-studio visual-studio-2010 boost

我正在尝试将 Boost 1.66 与 VS2010 一起使用,但在包含 header 后我在编译时遇到了一些问题。任何人都有类似的问题,可以帮助我解决这个问题吗?

我需要调用一个 ffmpeg 进程,使用 Windows CreateProcess 构建它很痛苦,但没有成功。

Error   1   error C3646: 'noexcept' : unknown override specifier    C:\_libs\boost_1_66_0\boost\process\detail\config.hpp   65
Error   2   error C2660: 'boost::process::process_error::process_error' : function does not take 2 arguments    C:\_libs\boost_1_66_0\boost\process\detail\config.hpp   72
Error   3   error C2660: 'boost::process::process_error::process_error' : function does not take 2 arguments    C:\_libs\boost_1_66_0\boost\process\detail\config.hpp   77
Error   4   error C2440: '<function-style-cast>' : cannot convert from 'std::error_code' to 'boost::process::process_error' C:\_libs\boost_1_66_0\boost\process\detail\config.hpp   82
Error   5   error C2146: syntax error : missing ';' before identifier 'Char'    C:\_libs\boost_1_66_0\boost\process\detail\config.hpp   86
Error   6   error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   C:\_libs\boost_1_66_0\boost\process\detail\config.hpp   86
Error   7   error C2146: syntax error : missing ';' before identifier 'null_char'   C:\_libs\boost_1_66_0\boost\process\detail\config.hpp   86
Error   8   error C2144: syntax error : 'char' should be preceded by ';'    C:\_libs\boost_1_66_0\boost\process\detail\config.hpp   87
Error   9   error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   C:\_libs\boost_1_66_0\boost\process\detail\config.hpp   87
Error   10  error C2086: 'int boost::process::detail::constexpr' : redefinition C:\_libs\boost_1_66_0\boost\process\detail\config.hpp   87

最佳答案

Visual Studio 2010、2012、2013 不支持 noxcept、constexpr。

尝试使用旧的 bo​​ost 或在包含 boost 之前添加

#define noexcept
#define constexpr

关于c++ - vs2010 上的 Boost Process 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48469290/

相关文章:

c++ - GetWindowlong 检查按钮样式

asp.net - 身份验证模式 ="Forms"导致 WCF 端点出现错误

visual-studio-2010 - Visual Studio 代码片段文字替换过早结束

c++ - 没有函数模板的实例与参数列表匹配(试图打印数组)

c++ - 使用 Media Foundation SDK 进行直播

c# - WinForms:如何防止面板随窗口内容滚动?

c++ - 在 Visual Studio 2010 和 11 之间共享 C++ 解决方案

c# - Visual Studio 2010想要将项目作为类库启动

c++ - 换行符在 C/C++ 中意味着什么?

c++ - 用户输入不完整