Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
No replies
awaishassan
awaishassan
1 Post
ACCEPTED ANSWER

Pinned topic XLC compile error for a tuxedo client code (C Language)

‏2011-06-18T10:57:28Z |
Hi,

I have XL C/C++ for AIX (Evaluation version) installed on my DEV SERVER with aix6.1. I can compile and build sample tuxedo client code provided with tuxedo installations, but when i try to compile/build my own client code(also in C) I get following errors.

==========================================================================================================================
$ e/sibusr/tuxedo11gR1/lib -I /usr/include/sys -I../include -I /usr/vac/lib -O /home/sibusr/tuxedo11gR1/lib/tpinit.o ptcltuxcl.c -c <
"ptcltuxcl.c", line 1.19: 1506-166 (S) Definition of function TuxedoClient requires parentheses.
"/usr/include/sys/inttypes.h", line 59.9: 1506-045 (S) Undeclared identifier intmax_t.
"/usr/include/sys/inttypes.h", line 61.3: 1506-273 (E) Missing type in declaration of imaxdiv_t.
"/usr/include/sys/inttypes.h", line 64.8: 1506-166 (S) Definition of function intmax_t requires parentheses.
"/usr/include/sys/inttypes.h", line 64.17: 1506-276 (S) Syntax error: possible missing '{'?
"/usr/include/sys/inttypes.h", line 68.30: 1506-045 (S) Undeclared identifier __nptr.
"/usr/include/sys/inttypes.h", line 68.38: 1506-045 (S) Undeclared identifier __endptr.
"/usr/include/sys/inttypes.h", line 68.48: 1506-045 (S) Undeclared identifier __base.
"/usr/include/sys/inttypes.h", line 89.8: 1506-166 (S) Definition of function intmax_t requires parentheses.
"/usr/include/sys/inttypes.h", line 89.17: 1506-276 (S) Syntax error: possible missing '{'?
"/usr/include/sys/types.h", line 336.3: 1506-273 (E) Missing type in declaration of sigset_t.
"/usr/include/sys/types.h", line 348.9: 1506-046 (S) Syntax error.
"/usr/include/sys/types.h", line 383.9: 1506-046 (S) Syntax error.
"/usr/include/sys/types.h", line 473.9: 1506-166 (S) Definition of function uint64_t requires parentheses.
"/usr/include/sys/types.h", line 473.18: 1506-276 (S) Syntax error: possible missing '{'?
"/usr/include/sys/types.h", line 481.39: 1506-273 (E) Missing type in declaration of quad.
"/usr/include/sys/vm_types.h", line 36.9: 1506-166 (S) Definition of function ulong_t requires parentheses.
"/usr/include/sys/vm_types.h", line 36.25: 1506-276 (S) Syntax error: possible missing '{'?
"/usr/include/sys/vm_types.h", line 153.9: 1506-045 (S) Undeclared identifier vmhandle_t.
"/usr/include/sys/vm_types.h", line 154.9: 1506-045 (S) Undeclared identifier caddr_t.
"/usr/include/sys/vm_types.h", line 159.3: 1506-273 (E) Missing type in declaration of vmaddr_t.
"/usr/include/sys/vm_types.h", line 169.9: 1506-046 (S) Syntax error.
"/usr/include/sys/vm_types.h", line 195.9: 1506-046 (S) Syntax error.
"/usr/include/sys/vm_types.h", line 266.9: 1506-166 (S) Definition of function vmhandle_t requires parentheses.
"/usr/include/sys/vm_types.h", line 266.25: 1506-276 (S) Syntax error: possible missing '{'?
"/usr/include/sys/m_types.h", line 51.3: 1506-273 (E) Missing type in declaration of label_t.
"/usr/include/sys/m_types.h", line 53.9: 1506-166 (S) Definition of function int32long64_t requires parentheses.
"/usr/include/sys/m_types.h", line 53.25: 1506-276 (S) Syntax error: possible missing '{'?
"/usr/include/sys/types.h", line 565.30: 1506-273 (E) Missing type in declaration of physadr_t.
"/usr/include/sys/types.h", line 566.9: 1506-166 (S) Definition of function physadr_t requires parentheses.
"/usr/include/sys/types.h", line 566.25: 1506-276 (S) Syntax error: possible missing '{'?
"/usr/include/sys/types.h", line 605.9: 1506-046 (S) Syntax error.

=========================================================================================================================
Can you please guide me through this.
Regards,
Awais
Updated on 2011-06-18T11:43:55Z at 2011-06-18T11:43:55Z by Dwayne_M
  • Dwayne_M
    Dwayne_M
    9 Posts
    ACCEPTED ANSWER

    Re: XLC compile error for a tuxedo client code (C Language)

    ‏2011-06-18T11:43:55Z  in response to awaishassan
    Hi Awais,

    By adding -I /usr/include/sys to the command line the compiler is picking up include files from /usr/include/sys that it should be picking up from /usr/vac/include/sys. Please remove "-I /usr/include/sys" from your compiler command.

    Also, any header files in the sys subdirectory should be included in your source code as:
    #include <sys/filename.h>
    not
    #include <filename.h>
    Dwayne Moore Market Manager, Power & Compilers IBM Corporation | Rational Software