开发者

CodeSourcery giving compilation error: missing bits/c++config.h

开发者 https://www.devze.com 2023-01-08 06:22 出处:网络
in my project I\'m making use of Eigen C++ library for linear algebra. ONLY when I turn on the vectorization flags (-mfpu=neon -mfloat-abi=softfp) for ARM NEON, I get a compiler error - c++config.h no

in my project I'm making use of Eigen C++ library for linear algebra. ONLY when I turn on the vectorization flags (-mfpu=neon -mfloat-abi=softfp) for ARM NEON, I get a compiler error - c++config.h no such file or directory.

I'm not able to understand whats going wrong, what is this bits/c++config.h? What should I do to fix this problem?

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/S开发者_如何学Goourcery_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

Errors

**** 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


I was gettng the same error:

/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

It is resolved after installing libstdc++-devel.x86_64 0:4.6.3-2.fc15 in fedora 15.


I got a response from the Codesourcery team. This problem was caused because I had not installed all the add-ons. The installation of the add-ons is a very simple step, if you are running in CodeSourcery's Eclipse environment then you have to just go to Help > Install New Software and after that its pretty straight forward (For more follow the 3rd chapter of getting-started guide).

Once the add-ons were installed, I stopped getting the fatal error: bits/c++config.h: No such file or directory compilation terminated. (Read more about the compiler options from 3rd chapter)

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号