AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.


#Power
 View Only
Expand all | Collapse all

Compilation error invoking getprocs from C++ on v11.1 of XL C/C++ compiler

  • 1.  Compilation error invoking getprocs from C++ on v11.1 of XL C/C++ compiler

    Posted Thu December 02, 2010 01:54 PM

    Originally posted by: SystemAdmin


    AIX 6.1 TL06 SP1

    XL C/C++ v11.1 with Sep 2010 PTF applied

    I am receiving a compilation error on some C++ source code the compiled cleanly under v10.1 (Oct 2008 PTF) applied. The code invokes the getprocs subroutine and generate the following information when an attempt is made to compile with the new compiler:

    "sysunix.cpp", line 73.1: 1540-1172 (S) More than one function "getprocs" has non-C++ linkage.
    "/usr/include/procinfo.h", line 973.9: 1540-0424 (I) "getprocs" is declared on line 973 of "/usr/include/procinfo.h".
    make: 1254-004 The error code from the last command is 1.

    Here is the function declaration for the identified code fragment:

    71
    72 extern "C" int
    73 getprocs (procsinfo *, int, fdsinfo *, int, pid_t *, int);
    74

    Any clues as to why the compiler is objecting to code that hasn't changed?
    #AIX-Forum


  • 2.  Re: Compilation error invoking getprocs from C++ on v11.1 of XL C/C++ compiler

    Posted Thu December 02, 2010 05:25 PM

    Originally posted by: SystemAdmin


    Found my answer, it appears that the /usr/include/procinfo.h file defintion was corrected to include the proper defintion for getprocs.
    #AIX-Forum