在我的项目中,我正在使用eIgen c ++库进行线性代数。只有当我打开矢量化标志(-mfpu= neon -mfloat-abi= sofffp)进行arm neon,我得到一个编译器错误 - c ++ config.h没有这样的文件或目录。

我无法理解出错了什么,这个位/ c ++ config.h?我该怎么办才能解决这个问题?

vikram


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!!";
}
.


makefile

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

我收到了代码库团队的回复。这个问题是因为我没有安装所有附加组件而导致。加载项的安装是一个非常简单的步骤,如果您在Codesourcery的Eclipse环境中运行,那么您必须只需访问“帮助”>“安装新软件”,然后在其上直截了当(如需更遵循的第三章 - 开始指南)。

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

其他提示

我得到了同样的错误:

/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后解决了。

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top