我正在尝试将 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。
尝试使用旧的 boost 或在包含 boost 之前添加
#define noexcept
#define constexpr
关于c++ - vs2010 上的 Boost Process 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48469290/