sag*_*rgp 11 cross-compiling raspberry-pi
我正在尝试向Raspberry Pi移植一个大型项目,该项目大量使用C++ 11特性.该项目使用CMAKE,我使用crosstool-ng进行交叉编译.我在Pi上安装了依赖项并在本地复制它们,我设法让CMAKE找到它们.一些代码正确构建并生成ARM输出.但是,大多数代码都因令人困惑的GCC输出而失败,我非常肯定与C++ 11 /模板支持有关.例如,我得到这样的错误:
error: 'mutex' in namespace 'std' does not name a type (有问题的文件包含<thread>,如果我还包含<mutex>,则此错误消失,而不是x86 Ubuntu的要求)
error: expected class-name before '{' token(前{的行是:template<typename _Res> class __basic_future : public std::__future_base)
error: '__result_type' does not name a type (这可能是由于上面的错误而发生的)
这些错误看起来像ARM g ++编译器不太喜欢模板.正在使用的g ++版本是arm-unknown-linux-gnueabi-g++ (crosstool-NG 1.18.0) 4.7.3 20130102 (prerelease).
谁能指出我正确的方向?
编辑:以下是其中一个文件的g ++外观ps:
arm-unknown-linux-gnueabi-g++ -DprojectCore_EXPORTS -fPIC
-I/home/sagar/workspace/RaspberryPi/target_env/usr/include
-I/home/sagar/workspace/RaspberryPi/target_env/usr/include/freetype2
-I/home/sagar/workspace/RaspberryPi/target_env/usr/include/glib-2.0
-I/home/sagar/workspace/RaspberryPi/target_env/usr/lib/arm-linux-gnueabihf/glib-2.0/include
-I/home/sagar/workspace/RaspberryPi/target_env/usr/include/gdk-pixbuf-2.0
-I/home/sagar/workspace/RaspberryPi/target_env/usr/include/gtk-2.0
-I/home/sagar/workspace/RaspberryPi/target_env/usr/lib/arm-linux-gnueabihf/gtk-2.0/include
-I/home/sagar/workspace/RaspberryPi/target_env/usr/include/cairo
-I/home/sagar/workspace/RaspberryPi/target_env/usr/include/pango-1.0
-I/home/sagar/workspace/RaspberryPi/target_env/usr/include/atk-1.0
-I/home/sagar/workspace/RaspberryPi/target_env/usr/local/include
-I/home/sagar/workspace/RaspberryPi/target_env/usr/include/eigen3
-I/home/sagar/workspace/RaspberryPi/target_env/usr/include/flann
-I/home/sagar/workspace/project/include -std=c++0x -Wall -Werror -Wno-deprecated -fPIC -g -O4
-o CMakeFiles/projectCore.dir/src/project/Core/Memory/Array2D.C.o -c /home/sagar/workspace/project/src/project/Core/Memory/Array2D.C
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3017 次 |
| 最近记录: |