- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Compilation Issue
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-15-2009 09:23 PM
тАО03-15-2009 09:23 PM
/ProdCommon/opt/aCC/include/cstdlib", line 14: error #2168: a function type
is not allowed here
inline long abs (long a) { return labs( a ); }
^
"/ProdCommon/opt/aCC/include/cstdlib", line 14: error #2065: expected a ";"
inline long abs (long a) { return labs( a ); }
^
"/ProdCommon/opt/aCC/include/cstdlib", line 15: warning #4347-D: "inline" is a
keyword in the C99 C Standard, and its usage as an identifier will
cause an error in C99 mode
inline ldiv_t div (long a, long b) { return ldiv( a, b ); }
^
"/ProdHome/fdnaperf/test/aml/utf8/include/fstring.h", line 17: warning #2012-D:
parsing restarts here after previous syntax error
_Number5_ f_strlen(const unsigned char *s);
^
"/ProdHome/fdnaperf/test/aml/utf8/include/fstring.h", line 21: error #2168: a
function type is not allowed here
_Number5_ f_strcmp(const unsigned char *s1, const unsigned char *s2);
^
"/ProdHome/fdnaperf/test/aml/utf8/include/fstring.h", line 25: error #2168: a
function type is not allowed here
_Number5_ f_strcpy(unsigned char *dst, const unsigned char *src);
^
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-16-2009 12:24 AM
- Tags:
- -AA
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-16-2009 01:53 AM
тАО03-16-2009 01:53 AM
Re: Compilation Issue
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-16-2009 02:07 AM
тАО03-16-2009 02:07 AM
Re: Compilation Issue
That can't happen unless you tell aCC that you are compiling C source with -Ae, -AC89 or -AC99.
What does you compile line look like?
>Could you please tell me how to use default -AA headers
Remove any -I paths that have: /ProdCommon/opt/aCC/include
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-16-2009 02:19 AM
тАО03-16-2009 02:19 AM
Re: Compilation Issue
My compile line looks like this
aCC -D__hpux_ -D__hpux_ +Z -g -c -Ae
I even tried with
cc -D__hpux_ -D__hpux_ +Z -g -c -Ae
After removing -I paths that have: /ProdCommon/opt/aCC/include I am getting more errors which are listed below
/usr/include/stdio.h", line 263: error #2080: a storage class may not be
specified here
extern int sprintf(char *, const char *,...);
^
"/usr/include/stdio.h", line 263: error #2168: a function type is not allowed
here
extern int sprintf(char *, const char *,...);
^
"/usr/include/stdio.h", line 264: error #2080: a storage class may not be
specified here
extern int sscanf(const char *, const char *,...);
^
"/usr/include/stdio.h", line 264: error #2168: a function type is not allowed
here
extern int sscanf(const char *, const char *,...);
^
"/usr/include/stdio.h", line 265: error #2080: a storage class may not be
specified here
extern int fgetc(FILE *);
^
"/usr/include/stdio.h", line 265: error #2020: identifier "FILE" is undefined
extern int fgetc(FILE *);
^
"/usr/include/stdio.h", line 265: error #2168: a function type is not allowed
here
extern int fgetc(FILE *);
^
"/usr/include/stdio.h", line 266: error #2080: a storage class may not be
specified here
extern char *fgets(char *, int, FILE *);
^
"/usr/include/stdio.h", line 266: error #2020: identifier "FILE" is undefined
extern char *fgets(char *, int, FILE *);
^
"/usr/include/stdio.h", line 266: error #2168: a function type is not allowed
here
extern char *fgets(char *, int, FILE *);
^
"/usr/include/stdio.h", line 267: error #2080: a storage class may not be
specified here
extern int fputc(int, FILE *);
^
"/usr/include/stdio.h", line 267: error #2020: identifier "FILE" is undefined
extern int fputc(int, FILE *);
^
"/usr/include/stdio.h", line 267: error #2168: a function type is not allowed
here
extern int fputc(int, FILE *);
^
"/usr/include/stdio.h", line 268: error #2080: a storage class may not be
specified here
extern int fputs(const char *, FILE *);
^
"/usr/include/stdio.h", line 268: error #2020: identifier "FILE" is undefined
extern int fputs(const char *, FILE *);
^
"/usr/include/stdio.h", line 268: error #2168: a function type is not allowed
here
extern int fputs(const char *, FILE *);
^
"/usr/include/stdio.h", line 269: error #2080: a storage class may not be
specified here
extern int getc(FILE *);
^
"/usr/include/stdio.h", line 269: error #2020: identifier "FILE" is undefined
extern int getc(FILE *);
^
"/usr/include/stdio.h", line 269: error #2168: a function type is not allowed
here
extern int getc(FILE *);
^
"/usr/include/stdio.h", line 270: error #2080: a storage class may not be
specified here
extern int getchar(void);
^
"/usr/include/stdio.h", line 270: error #2168: a function type is not allowed
here
extern int getchar(void);
^
"/usr/include/stdio.h", line 271: error #2080: a storage class may not be
specified here
extern char *gets(char *);
^
"/usr/include/stdio.h", line 271: error #2168: a function type is not allowed
here
extern char *gets(char *);
^
"/usr/include/stdio.h", line 272: error #2080: a storage class may not be
specified here
extern int putc(int, FILE *);
^
"/usr/include/stdio.h", line 272: error #2020: identifier "FILE" is undefined
extern int putc(int, FILE *);
^
"/usr/include/stdio.h", line 272: error #2168: a function type is not allowed
here
extern int putc(int, FILE *);
^
"/usr/include/stdio.h", line 273: error #2080: a storage class may not be
specified here
extern int putchar(int);
^
"/usr/include/stdio.h", line 273: error #2168: a function type is not allowed
here
extern int putchar(int);
^
"/usr/include/stdio.h", line 274: error #2080: a storage class may not be
specified here
extern int puts(const char *);
^
"/usr/include/stdio.h", line 274: error #2168: a function type is not allowed
here
extern int puts(const char *);
^
"/usr/include/stdio.h", line 275: error #2080: a storage class may not be
specified here
extern int ungetc(int, FILE *);
^
"/usr/include/stdio.h", line 275: error #2020: identifier "FILE" is undefined
extern int ungetc(int, FILE *);
^
"/usr/include/stdio.h", line 275: error #2168: a function type is not allowed
here
extern int ungetc(int, FILE *);
^
"/usr/include/stdio.h", line 282: error #2080: a storage class may not be
specified here
extern FILE *tmpfile(void);
^
"/usr/include/stdio.h", line 282: error #2020: identifier "FILE" is undefined
extern FILE *tmpfile(void);
^
"/usr/include/stdio.h", line 282: error #2168: a function type is not allowed
here
extern FILE *tmpfile(void);
^
"/usr/include/stdio.h", line 283: error #2080: a storage class may not be
specified here
extern int fgetpos(FILE *, fpos_t *);
^
"/usr/include/stdio.h", line 283: error #2020: identifier "FILE" is undefined
extern int fgetpos(FILE *, fpos_t *);
^
"/usr/include/stdio.h", line 283: error #2168: a function type is not allowed
here
extern int fgetpos(FILE *, fpos_t *);
^
"/usr/include/stdio.h", line 284: error #2080: a storage class may not be
specified here
extern int fsetpos(FILE *, const fpos_t *);
^
"/usr/include/stdio.h", line 284: error #2020: identifier "FILE" is undefined
extern int fsetpos(FILE *, const fpos_t *);
^
"/usr/include/stdio.h", line 284: error #2168: a function type is not allowed
here
extern int fsetpos(FILE *, const fpos_t *);
^
"/usr/include/stdio.h", line 285: error #2080: a storage class may not be
specified here
extern FILE *fopen(const char *, const char *);
^
"/usr/include/stdio.h", line 285: error #2020: identifier "FILE" is undefined
extern FILE *fopen(const char *, const char *);
^
"/usr/include/stdio.h", line 285: error #2168: a function type is not allowed
here
extern FILE *fopen(const char *, const char *);
^
"/usr/include/stdio.h", line 286: error #2080: a storage class may not be
specified here
extern FILE *freopen(const char *, const char *, FILE *);
^
"/usr/include/stdio.h", line 286: error #2020: identifier "FILE" is undefined
extern FILE *freopen(const char *, const char *, FILE *);
^
"/usr/include/stdio.h", line 286: error #2020: identifier "FILE" is undefined
extern FILE *freopen(const char *, const char *, FILE *);
^
"/usr/include/stdio.h", line 286: error #2168: a function type is not allowed
here
extern FILE *freopen(const char *, const char *, FILE *);
^
"/usr/include/stdio.h", line 296: error #2080: a storage class may not be
specified here
extern int fseek(FILE *, long int, int);
^
"/usr/include/stdio.h", line 296: error #2020: identifier "FILE" is undefined
extern int fseek(FILE *, long int, int);
^
"/usr/include/stdio.h", line 296: error #2168: a function type is not allowed
here
extern int fseek(FILE *, long int, int);
^
"/usr/include/stdio.h", line 297: error #2080: a storage class may not be
specified here
extern long int ftell(FILE *);
^
"/usr/include/stdio.h", line 297: error #2020: identifier "FILE" is undefined
extern long int ftell(FILE *);
^
"/usr/include/stdio.h", line 297: error #2168: a function type is not allowed
here
extern long int ftell(FILE *);
^
"/usr/include/stdio.h", line 298: error #2080: a storage class may not be
specified here
extern void rewind(FILE *);
^
"/usr/include/stdio.h", line 298: error #2020: identifier "FILE" is undefined
extern void rewind(FILE *);
^
"/usr/include/stdio.h", line 298: error #2168: a function type is not allowed
here
extern void rewind(FILE *);
^
"/usr/include/stdio.h", line 299: error #2080: a storage class may not be
specified here
extern void clearerr(FILE *);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-16-2009 02:30 AM
тАО03-16-2009 02:30 AM
Re: Compilation Issue
Why are you using -Ae, I mentioned that would cause the problem by switching to C mode.
Who is testing __hpux_? The compiler automatically sets __hpux.
>I am getting more errors which are listed below
Hmm, those don't look the errors you get when compiling C++ source with C, especially for /usr/include/stdio.h. It could be an evil macro problem?
- Tags:
- evil macro
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-16-2009 03:28 AM
тАО03-16-2009 03:28 AM
Re: Compilation Issue
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-16-2009 07:18 PM
тАО03-16-2009 07:18 PM
Re: Compilation Issue
Is this C or C++?
If evil macro, compile with +legacy_cpp and see what errors you get.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-16-2009 07:54 PM
тАО03-16-2009 07:54 PM
Re: Compilation Issue
This is C program
Afer compiling with +legacy_cpp .I am getting the following error
cc: internal error 1901: cannot exec /opt/langtools/lbin/cpp.ansi: 2 (No such file or directory)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-16-2009 09:10 PM
тАО03-16-2009 09:10 PM
Re: Compilation Issue
Where is the compiler installed?
If it is in /ProdCommon/opt/aCC, you will have to use:
+legacy_cpp=/ProdCommon/opt/langtools/lbin/cpp.ansi