views:

135

answers:

1

Hi Guys,

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

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
A: 

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)

vikramtheone