Troubleshooting
Problem
When compiling code using math.h on AIX 6.1 or later, and explicitly including the compiler header file directory in the include file search path, the compiler is unable to find the standard math function declarations.
Symptom
Compiling the following test case and explicitly including the compiler header file directory in the -I search path results in the following error messages:
$ cat test.cpp
#include <math.h>
int main()
{
return ceil(5.6) + floor(6.3);
}
$ xlC test.cpp -I/usr/vacpp/include
"test.cpp", line 5.16: 1540-0274 (S) The name lookup for "ceil" did not find a declaration.
"test.cpp", line 5.28: 1540-0274 (S) The name lookup for "floor" did not find a declaration.
$
Compiling on AIX 5.3 or earlier succeeds.
Log InLog in to view more of this document
Was this topic helpful?
Document Information
Modified date:
06 December 2018
UID
swg21499673