CodeSourcery给出编译错误:缺少bits / c ++ config.h

时间:2010-07-20 14:01:57

标签: c++ compiler-errors arm neon codesourcery

在我的项目中,我正在使用Eigen C ++库进行线性代数。 ONLY 当我打开ARM NEON的矢量化标志(-mfpu = neon -mfloat-abi = softfp)时,我收到编译错误 - c ++ config.h没有这样的文件或目录。< / p>

我无法理解什么是错误的,这是什么bit / c ++ config.h?我该怎么做才能解决这个问题?

维克拉姆


的main.c

#include<iostream>
#include <Eigen/Core>

// import most common Eigen types
using namespace Eigen;

int main(int, char *[])
{
    Matrix4f m3;
    m3 << 1, 2, 3, 0, 4, 5, 6, 0, 7, 8, 9, 0, 0, 0, 0, 0;
    Matrix4f m4;

    asm("#begins here");
    m4 = m3*m3;
    asm("#ends here");

    std::cout << "m3\n" << m3 << "\nm4:\n" << m4 << std::endl;

    std::cout << "DONE!!";
}

生成文件

CPP=    /home/ubuntu/CodeSourcery/Sourcery_G++/bin/arm-none-linux-gnueabi-c++

all: main 

main: main.cpp
    $(CPP) -mfpu=neon -mfloat-abi=softfp -I /home/ubuntu/Documents/eigen/ main.cpp -o main

clean:
    rm -rf *o main

错误

**** Build of configuration Debug for project Test_Eigen ****

make all
/home/ubuntu/CodeSourcery/Sourcery_G++/bin/arm-none-linux-gnueabi-c++ -mfpu=neon -mfloat-abi=softfp -I /home/ubuntu/Documents/eigen/ main.cpp -o main
In file included from main.cpp:1:
/home/ubuntu/CodeSourcery/Sourcery_G++/bin/../lib/gcc/arm-none-linux-gnueabi/4.4.1/../../../../arm-none-linux-gnueabi/include/c++/4.4.1/iostream:39: fatal error: bits/c++config.h: No such file or directory
compilation terminated.
make: *** [main] Error 1

2 个答案:

答案 0 :(得分:2)

我得到了同样的错误:

/usr/lib/gcc/x86_64-redhat-linux/4.6.3/../../../../include/c++/4.6.3/iostream:39: error: bits/c++config.h: No such file or directory

在fedora 15中安装libstdc++-devel.x86_64 0:4.6.3-2.fc15后解决了这个问题。

答案 1 :(得分:0)

我收到了来自Codesourcery团队的回复。导致此问题是因为我没有安装所有加载项。安装附加组件是一个非常简单的步骤,如果您在CodeSourcery的Eclipse环境中运行,那么您只需要转到帮助&gt;安装新软件,之后非常直接(更多关注入门指南的第3章)。

一旦安装了附加组件,我就停止了致命的错误:bits / c ++ config.h:没有终止这样的文件或目录编译。 (阅读第3章中有关编译器选项的更多信息)

相关问题