Boost::Spirit编译错误
Boost::Spirit compilation error
我很少问编译错误,但以下几种错误让我困惑。
我成功地编译了Android的boost库,我正试图使用它的Spirit库来构建一个解析器。但是当我试着编译。我得到以下错误:
关于endian.hpp中的第一个错误,我想我需要在文件中包含其cpu类型(Android)。但我不知道为什么我得到其他错误。如有任何提示或提示,我将不胜感激。
<>之前>在文件中包含from> C:/Progra ~ 1/Android/android-ndk-r6b/资源/提高/提高/精神/home/支持/细节/整数/endian.hpp: 37岁>从C:/program ~1/Android/Android -ndk-r6b/sources/boost/boost/spirit/home/support/detail/endan .hpp:24,>从C:/program ~1/Android/Android -ndk-r6b/sources/boost/boost/spirit/home/qi/binary/binary.hpp:16,>从C:/program ~1/Android/Android -ndk-r6b/sources/boost/boost/spirit/home/qi/binary.hpp:14,>从C:/program ~1/Android/Android -ndk-r6b/sources/boost/boost/spirit/home/qi.hpp:18,>从C:/program ~1/Android/Android -ndk-r6b/sources/boost/boost/spirit/include/qi.hpp:16,>从D:/mywork/dev/eclWork/BoostTest/jni/ndkfoo.cpp:24:> C:/Progra ~ 1/Android/android-ndk-r6b/资源/提高/提高/细节/endian.hpp: 74:3:文件boost/detail/endian.hpp需要设置> CPU类型。文件中包括> C:/Progra ~ 1/Android/android-ndk-r6b/资源/提高/提高/精神/home/气/directive.hpp: 14日>从C:/program ~1/Android/Android -ndk-r6b/sources/boost/boost/spirit/home/qi.hpp:19,>从C:/program ~1/Android/Android -ndk-r6b/sources/boost/boost/spirit/include/qi.hpp:16,>从D:/mywork/dev/eclWork/BoostTest/jni/ndkfoo.cpp:24:> C:/Progra ~ 1/Android/android-ndk-r6b/资源/提高/提高/精神/home/气/指令/as.hpp: 128:>错误:'wstring'不是'std'的成员> C:/Progra ~ 1/Android/android-ndk-r6b/资源/提高/提高/精神/home/气/指令/as.hpp: 128:>错误:'wstring'不是'std'的成员> C:/Progra ~ 1/Android/android-ndk-r6b/资源/提高/提高/精神/home/气/指令/as.hpp: 128:>错误:模板参数2无效> C:/Progra ~ 1/Android/android-ndk-r6b/资源/提高/提高/数学/special_functions/fpclassify.hpp: 20,>从C:/program ~1/Android/Android -ndk-r6b/sources/boost/boost/spirit/home/support/detail/sign.hpp:22,>从C:/program ~1/Android/Android -ndk-r6b/sources/boost/boost/spirit/home/qi/numeric/detail/real_impl.hpp:22,>从C:/program ~1/Android/Android -ndk-r6b/sources/boost/boost/spirit/home/qi/numeric/real.hpp:21,>从C:/program ~1/Android/Android -ndk-r6b/sources/boost/boost/spirit/home/qi/numeric.hpp:17,>从C:/program ~1/Android/Android -ndk-r6b/sources/boost/boost/spirit/home/qi.hpp:21,>从C:/program ~1/Android/Android -ndk-r6b/sources/boost/boost/spirit/include/qi.hpp:16,>从D:/mywork/dev/eclWork/BoostTest/jni/ndkfoo.cpp:24:> C:/Progra ~ 1/Android/android-ndk-r6b/资源/提高/提高/数学/special_functions/细节/fp_traits.hpp: 472:>错误:对不完整类型使用sizeof无效>"boost:: STATIC_ASSERTION_FAILURE"> C:/Progra ~ 1/Android/android-ndk-r6b/资源/提高/提高/数学/special_functions/细节/fp_traits.hpp:在静态成员函数'static void '中> boost::math::detail::fp_traits_non_native boost::math::detail::extended_double_precision>::get_bits(long double;> uint32_t&)":> C:/Progra ~ 1/Android/android-ndk-r6b/资源/提高/提高/数学/special_functions/细节/fp_traits.hpp: 457:> error: 'offset_'未在此范围内声明> C:/Progra ~ 1/Android/android-ndk-r6b/资源/提高/提高/数学/special_functions/细节/fp_traits.hpp:在静态成员函数'static void '中> boost::math::detail::fp_traits_non_native boost::math::detail::extended_double_precision>::set_bits(长> double&, uint32_t)':> C:/Progra ~ 1/Android/android-ndk-r6b/资源/提高/提高/数学/special_functions/细节/fp_traits.hpp: 462:> error: 'offset_'未在此范围内声明。make: ***> [/mywork/dev/eclWork cygdrive/d//提高/obj/地方/armeabi/obj/ndkfoo/ndkfoo.o]>错误1也许这有点晚了,但这可以通过添加-D_LITTLE_ENDIAN来轻松修复。
我最近用这里描述的补丁修改了我的endian.hpp
https://github.com/MysticTreeGames/Boost-for-Android/commit/8e2a1811445c077bc42f9d241cf0546f707786f3伟大作品
我想你的问题的答案在这里。Android似乎就是不支持std::wstring。然而,我认为精神仍然应该工作(给定CPU端序设置)仅与char
类型-你试过吗?
相关文章:
- 用MacOS Mojave编译C++:致命错误:mpi.h:没有这样的文件或目录
- std::is_base_of表示ctor编译错误
- 我的项目不会像"undefined reference to `grpc::g_core_codegen_interface'"那样使用未定义的引用错误进行编译
- 在没有定义返回类型的函数中返回布尔值,并将结果保存在无错误的char编译中-为什么
- Qt5:使用QCommandLineParser类时出现奇怪的编译错误
- Qt Cmake 错误编译"GuiSupportQt not found"
- Opengl 精度转换错误编译错误 E0415
- 库将ARM架构错误编译为架构X64
- RT 音频 Mac 错误 g++ 编译错误
- 错误编译Boost.log
- 错误编译QT创建者 / QT窗口小部件示例
- 错误编译MIPS32
- Visual Studio 2013 中的错误(编译和运行代码)
- 链接错误编译qt项目在visual 2010
- 无法用模板错误编译nsgmls
- 奇怪的错误.编译失败
- 如果有人调用c++中的方法,则强制错误(编译时)
- 来自autoconf测试的错误编译命令
- 时间限制超出错误C++编译
- SFML 2.3 和 CodeBlocks 错误编译