#include< cmath> :“In FIle included from”错误信息? [英] #include <cmath> : "In FIle included from" error message?

查看:7086
本文介绍了#include< cmath> :“In FIle included from”错误信息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用< cmath> 。如果我这样做:

I want to use <cmath>. If I do:

#include <cmath> 

我收到错误信息:


在文件中包含从

"In File included from"

但是,当我键入< cma 并且做ctrl +空格键(在Netbeans)它显示我所有可用的文件,并且 cmath 被列出(它在/ usr / include / c ++ / 4.7)。我不明白为什么GUI编辑器/智能感知知道 cmath 头存在,但我有错误在文件包括从?

However, when I type <cma and do ctrl+spacebar (in Netbeans) it shows me all the files available and cmath is listed (its in /usr/include/c++/4.7). I dont understand why the GUI editor/intellisense knows the cmath header exists, but I have the error "In File included from"?

完整错误消息:

In file included from /usr/include/c++/4.7/cmath:46:0,
                 from ../../Documents/FD/MyFile.h:4,
                 from ../../Documents/FD/MyFIle.cpp:1:
/opt/intel/include/math.h:27:3: error: #error "This Intel <math.h> is for use with only the Intel compilers!"
make[2]: *** [build/Debug/GNU-Linux-x86/_ext/2009285305/MyFile.o] Error 1
make[2]: Leaving directory `/home/me/NetBeansProjects/Project'
make[1]: *** [.build-conf] Error 2
make[1]: Leaving directory `/home/me/NetBeansProjects/Project'

这些是我的include目录:

These are my include directories:


/ opt / intel / include;

/opt/intel/include;

/ usr / include / boost;

/usr/include/boost;

/ usr / include

/usr/include

p>

EDIT (For Chris):

#ifndef MYFILE_H
#define MYFILE_H

#include <cmath>


class MyFile{
    public:
        static double doesntmatter(double x, int y, double z);

    private:
};

#endif


推荐答案

Netbeans知道几个标准库头文件,但这不保证您的路径已正确配置。检查以确保您的路径配置正确,并且正在使用正确的工具链。

Netbeans is aware of several standard library headers, but this does not guarantee that your path has been correctly configured. Check to insure that your path is correctly configured, and that you are using the correct toolchain.

没有更详细的错误消息我无法告诉您。

Without a more detailed error message I can't tell you much more than that.

这篇关于#include&lt; cmath&gt; :“In FIle included from”错误信息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆