代码之家  ›  专栏  ›  技术社区  ›  HaggarTheHorrible

代码编辑:编译错误:缺失位/c++配置文件h

  •  1
  • HaggarTheHorrible  · 技术社区  · 16 年前

    在我的项目中,我使用EGEN C++库来处理线性代数。 只有 当我打开ARM霓虹灯的矢量化标志(-MFPU= Neon -MFLAN ABI=SoFTFP)时,我得到编译器错误-c++ CONFIG.h没有这样的文件或目录。

    我不能理解什么是错误的,这是什么位/C++配置?我该怎么解决这个问题?

    维克拉姆


    主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 回复  |  直到 14 年前
        1
  •  2
  •   Charles Menguy jdw6415    14 年前

    我也犯了同样的错误:

    /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
    

    安装后解决 libstdc++-devel.x86_64 0:4.6.3-2.fc15 在费多拉15。

        2
  •  0
  •   HaggarTheHorrible    16 年前

    我得到了代码源团队的回复。这个问题是因为我没有安装所有的附加组件。安装附加组件是一个非常简单的步骤,如果您在codesourcery的Eclipse环境中运行,那么您只需转到“帮助”>安装新软件,然后再直接安装(有关更多信息,请参阅《入门指南》的第3章)。

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