#include <cmath> :"In FIle included from"错误消息?
#include <cmath> : "In FIle included from" error message?
我想用<cmath>
.如果我这样做:
#include <cmath>
我收到错误消息:
"在文件中包含自"
但是,当我键入 <cma
并执行 ctrl+空格键(在 Netbeans 中)时,它会显示所有可用的文件,并列出了cmath
(在/usr/include/c++/4.7 中)。我不明白为什么 GUI 编辑器/智能感知知道cmath
标头存在,但我有错误"在文件中包含自"?
完整的错误消息:
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'
这些是我的包含目录:
/opt/intel/include;
/usr/include/boost;
/usr/include
编辑(对于克里斯):
#ifndef MYFILE_H
#define MYFILE_H
#include <cmath>
class MyFile{
public:
static double doesntmatter(double x, int y, double z);
private:
};
#endif
Netbeans 知道几个标准库标头,但这并不能保证您的路径已正确配置。 检查以确保路径配置正确,并且使用的工具链正确。
如果没有更详细的错误消息,我无法告诉您更多。
相关文章:
- 如何解决"invalid conversion from 'char' to 'const char*'"
- std::async from std::async in windows xp
- std::is_reference from std::any
- std::time_point from and to std::string
- "No suitable conversion function from 'std::string' to 'const char *' exists"
- std::chrono::time_point from std::string
- Visual accept std::string from std::byte iterator
- C++中链表的错误"Abort signal from abort(3) (sigabrt) "
- dopen():不以 root 身份运行时"failed to map segment from shared object"
- C++ 中的"template <typename From, typename Tag> struct Alias;"是什么?
- from std::vector to adept::avector
- qt get child (Callout) from QChart
- Webassembly from Javascript
- Generate boost::uuids::uuid from boost::compute::detail::sha
- 什么是"Reading unbounded stream from standard input (Memory Management)"的例子
- Calling C++ dll from python
- 为什么我会收到"invalid conversion from 'Queue*/Stack*' to 'int'"错误消息?
- std::chrono 在从 main 或 from 类方法使用时给出不同的值
- 禁用"In file included from" g++ 消息
- #include <cmath> :"In FIle included from"错误消息?