提升 vs2010 上的进程错误

Boost Process errors on vs2010

本文关键字:进程 错误 vs2010 提升      更新时间:2023-10-16

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

我需要调用一个 ffmpeg 进程,使用 windows CreateProcess 在构建它时很痛苦,而且不起作用。

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

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

尝试较旧的速推或在包含速推之前添加

#define noexcept
#define constexpr