包含 math.h 时英特尔编译器会失败

包含 math.h 时英特尔编译器会失败

我有一个非常小的测试C程序,在一个名为的文件中test.c

#include <math.h>

int main()
{
    return 0;
}

如果我尝试使用来编译它icc test.c,我会出现以下错误,似乎在抱怨math.h

In file included from /usr/include/math.h(420),
                 from     /admin/apps/rhel7/intel/compilers_and_libraries_2017.4.196/linux/compiler/include/math.h(95),
             from test.c(1):
/usr/include/bits/mathcalls-helper-functions.h(21): error: identifier "_Float128" is undefined
  __MATHDECL_1 (int, __fpclassify,, (_Mdouble_ __value))
  ^

In file included from /usr/include/math.h(420),
             from /admin/apps/rhel7/intel/compilers_and_libraries_2017.4.196/linux/compiler/include/math.h(95),
             from test.c(1):
/usr/include/bits/mathcalls-helper-functions.h(25): error: identifier "_Float128" is undefined
  __MATHDECL_1 (int, __signbit,, (_Mdouble_ __value))
  ^

In file included from /usr/include/math.h(420),
             from /admin/apps/rhel7/intel/compilers_and_libraries_2017.4.196/linux/compiler/include/math.h(95),
             from test.c(1):
/usr/include/bits/mathcalls-helper-functions.h(30): error: identifier "_Float128" is undefined
  __MATHDECL_1 (int, __isinf,, (_Mdouble_ __value)) __attribute__ ((__const__));
  ^

In file included from /usr/include/math.h(420),
             from /admin/apps/rhel7/intel/compilers_and_libraries_2017.4.196/linux/compiler/include/math.h(95),
             from test.c(1):
/usr/include/bits/mathcalls-helper-functions.h(33): error: identifier "_Float128" is undefined
  __MATHDECL_1 (int, __finite,, (_Mdouble_ __value)) __attribute__ ((__const__));
  ^

In file included from /usr/include/math.h(420),
             from /admin/apps/rhel7/intel/compilers_and_libraries_2017.4.196/linux/compiler/include/math.h(95),
             from test.c(1):
/usr/include/bits/mathcalls-helper-functions.h(36): error: identifier "_Float128" is undefined
  __MATHDECL_1 (int, __isnan,, (_Mdouble_ __value)) __attribute__ ((__const__));
  ^

In file included from /usr/include/math.h(420),
             from /admin/apps/rhel7/intel/compilers_and_libraries_2017.4.196/linux/compiler/include/math.h(95),
             from test.c(1):
/usr/include/bits/mathcalls-helper-functions.h(39): error: identifier "_Float128" is undefined
  __MATHDECL_1 (int, __iseqsig,, (_Mdouble_ __x, _Mdouble_ __y));
  ^

In file included from /usr/include/math.h(420),
             from /admin/apps/rhel7/intel/compilers_and_libraries_2017.4.196/linux/compiler/include/math.h(95),
             from test.c(1):
/usr/include/bits/mathcalls-helper-functions.h(39): error: identifier "_Float128" is undefined
  __MATHDECL_1 (int, __iseqsig,, (_Mdouble_ __x, _Mdouble_ __y));
  ^

In file included from /usr/include/math.h(420),
             from /admin/apps/rhel7/intel/compilers_and_libraries_2017.4.196/linux/compiler/include/math.h(95),
             from test.c(1):
/usr/include/bits/mathcalls-helper-functions.h(42): error: identifier "_Float128" is undefined
  __MATHDECL_1 (int, __issignaling,, (_Mdouble_ __value))
  ^

In file included from test.c(1):
/admin/apps/rhel7/intel/compilers_and_libraries_2017.4.196/linux/compiler/include/math.h(1300): error: identifier "_LIB_VERSION_TYPE" is undefined
  _LIBIMF_EXT _LIB_VERSIONIMF_TYPE _LIBIMF_PUBVAR _LIB_VERSIONIMF;
          ^

compilation aborted for test.c (code 2)

我正在使用icc (ICC) 17.0.4 20170411。以前这不是问题,但我不确定系统管理员是否更改了英特尔编译器的版本。无论如何,像 这么简单的事情应该math.h可以解决,不是吗?我该如何理解这个错误?

相关内容