gpt4 book ai didi

c++ - CodeSourcery 给出编译错误 : missing bits/c++config. h

转载 作者:行者123 更新时间:2023-11-30 04:38:14 30 4
gpt4 key购买 nike

在我的项目中,我将 Eigen C++ 库用于线性代数。 当我为 ARM NEON 打开矢量化标志 (-mfpu=neon -mfloat-abi=softfp) 时,出现编译器错误 - c++config.h 没有这样的文件或目录。

我不明白哪里出了问题,这个 bits/c++config.h 是什么?我应该怎么做才能解决这个问题?

维克拉姆


主.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

最佳答案

我遇到了同样的错误:

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

关于c++ - CodeSourcery 给出编译错误 : missing bits/c++config. h,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3290729/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com