在构建C++项目时提升相关错误
Boost related errors while building a C++ project
我正在尝试构建一个用C++(https://sourceforge.net/p/open-chicken-invaders/code/HEAD/tree/trunk/(编写的旧游戏的克隆,但我遇到了一些无法解决的与 Boost 相关的错误。我尝试在Windows,Ubuntu和Raspberry Pi上构建这个项目,但每次都遇到相同的错误。开发人员处于非活动状态,我无法联系他。
pi@raspberrypi:~ $ cd openci
pi@raspberrypi:~/openci $ scons
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
g++ -o audio/controller_holder.o -c "`sdl2-config --cflags`" -Wextra -I. -DUSE_BOOST_CHRONO -DBOOST_SP_DISABLE_THREADS -DTIXML_USE_STL -O3 -DNDEBUG audio/controller_holder.cpp
In file included from ./context/objects_storage.h:27:0,
from ./objects/base/object.h:24,
from ./objects/base/active.h:24,
from audio/controller_holder.h:24,
from audio/controller_holder.cpp:22:
/usr/include/boost/move/detail/type_traits.hpp:1059:4: error: 'Align' is not a type
BOOST_STATIC_ASSERT(Align > 0);
^
/usr/include/boost/move/detail/type_traits.hpp:1059:4: error: expected ',' or '...' before '>' token
BOOST_STATIC_ASSERT(Align > 0);
^
./portability/cpp11.h:29:75: error: ISO C++ forbids declaration of 'BOOST_STATIC_ASSERT' with no type [-fpermissive]
# define static_assert(condition, message) BOOST_STATIC_ASSERT(condition)
^
/usr/include/boost/move/detail/type_traits.hpp:1064:4: error: 'value' is not a type
BOOST_STATIC_ASSERT(value >= Align);
^
/usr/include/boost/move/detail/type_traits.hpp:1064:4: error: expected ',' or '...' before '>=' token
BOOST_STATIC_ASSERT(value >= Align);
^
./portability/cpp11.h:29:75: error: ISO C++ forbids declaration of 'BOOST_STATIC_ASSERT' with no type [-fpermissive]
# define static_assert(condition, message) BOOST_STATIC_ASSERT(condition)
^
./portability/cpp11.h:29:46: error: 'int boost::move_detail::aligned_storage<Len, Align>::BOOST_STATIC_ASSERT(int)' cannot be overloaded
# define static_assert(condition, message) BOOST_STATIC_ASSERT(condition)
^
./portability/cpp11.h:29:46: error: with 'int boost::move_detail::aligned_storage<Len, Align>::BOOST_STATIC_ASSERT(int)'
# define static_assert(condition, message) BOOST_STATIC_ASSERT(condition)
^
/usr/include/boost/move/detail/type_traits.hpp:1065:4: error: expected identifier before '(' token
BOOST_STATIC_ASSERT((value % Align) == 0);
^
/usr/include/boost/move/detail/type_traits.hpp:1065:4: error: expected ')' before '%' token
BOOST_STATIC_ASSERT((value % Align) == 0);
^
/usr/include/boost/move/detail/type_traits.hpp:1065:4: error: expected ')' before '%' token
/usr/include/boost/move/detail/type_traits.hpp:1065:4: error: expected ';' at end of member declaration
BOOST_STATIC_ASSERT((value % Align) == 0);
^
/usr/include/boost/move/detail/type_traits.hpp:1065:4: error: expected unqualified-id before '%' token BOOST_STATIC_ASSERT((value % Align) == 0);
^
scons: *** [audio/controller_holder.o] Error 1
scons: building terminated because of errors.
pi@raspberrypi:~/openci $
我在其他地方读到过 Boost 未正确配置。我已经使用 apt-get install libboost1.62-all 安装了它。(在树莓派 3 上(。
我能做什么?
该项目使用
gcc 4.6
和 boost 1.58
编译得很好。
相关文章:
- libssh 的函数在构建 libssh 时无法在 Qt 和 cmake 错误中找到
- VSCode-有一个红色下划线,但程序构建和运行正确,并且出现配音错误
- Clion显示错误,但可以使用Cmake成功构建代码
- Agora.io 虚幻引擎插件构建错误
- VS 2015 链接错误 无法构建依赖于 libcurl 的项目
- 如何构建 SOCI 库而没有错误?
- 尝试将 boost::stacktrace 添加到 CMake 项目时出现构建错误
- Arch Linux.AUR 包 mysql 不能用 makepkg 构建.错误:构建 () 中出现故障
- GCC:随机构建导致执行期间分段错误
- 组件上的虚幻引擎可蓝图UFUNCTION会导致构建错误
- 构建失败错误:无法使用 qibuild 构建C++ SDK Helloworld
- 调试模板时出现问题.专门针对 Linux GCC 7、GCC 6、GCC 5、GCC 4.9 错误构建失败:模板参数 1
- MINGW的错误构建提升
- 从Canfestival错误构建CanOpen的示例
- 链接器错误构建GDAL VS2017
- Netbeans 7.4 C++简单的 hello world 错误构建失败尝试了 Google 搜索结果前 2 页上的
- 链接器错误构建 fibonnacci 示例与 boost::coroutine2 与 Boost 1.60 使用动态链接
- 使用CMake错误构建Thor SFML扩展
- 链接器错误构建GDAL
- 错误构建简单的MongoDB c++客户端示例