IBM Support

Missing math.h function declarations on AIX 6.1 or later

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.

[{"Product":{"code":"SSGH3R","label":"XL C\/C++ for AIX"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Component":"Compiler","Platform":[{"code":"PF002","label":"AIX"}],"Version":"10.1;11.1","Edition":"","Line of Business":{"code":"LOB73","label":"Power TPS"}}]

Log InLog in to view more of this document

This document has the abstract of a technical article that is available to authorized users once you have logged on. Please use Log in button above to access the full document. After log in, if you do not have the right authorization for this document, there will be instructions on what to do next.

Document Information

Modified date:
06 December 2018

UID

swg21499673