我刚刚安装了 devcpp,并试图确保它能正常工作。当我遇到围绕 math.h 的编译错误时。我正在使用之前编译和运行的几个简单程序,因此那里应该没有任何问题。我通常会改用 cmath,但我也需要使用 Magick++ 来做一些事情,它使用 math.h。有人遇到过这个吗?知道解决方法吗?
错误是
math.h 的第 594 行在“(”标记之前需要“)”
math.h 的第 594 行需要 ',' 或 ';'在 '(' 标记之前
'abs' 未声明
第 594 行
extern double __cdecl nearbyint (double);
在上下文中
/* 7.12.9.2 Double in C89 */
extern float __cdecl floorf (float);
extern long double __cdecl floorl (long double);
/* 7.12.9.3 */
extern double __cdecl nearbyint (double);
extern float __cdecl nearbyintf (float);
extern long double __cdecl nearbyintl (long double);
最佳答案
这有帮助吗 - http://www.cplusplus.com/forum/general/5207/
我现在也在用Dev C++,实在受不了,但是上课必用。有什么理由不能只使用 Visual Studio Express,它也是免费下载的 -
http://www.microsoft.com/en-us/download/details.aspx?id=34673
关于c++ - Dev C,math.h 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16341495/