HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: need help to compile a C program
Operating System - HP-UX
1833189
Members
2878
Online
110051
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- 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
12-13-2005 03:25 AM
12-13-2005 03:25 AM
Hi,
I need help to compile a C program on HP-UX 11.11. I was able successfully compile same program on Linux. Can somebody tell me what should i do based on the error below. I have attached the C program which i am trying to compile. Thanks.
gcc -D_HPUX_SOURCE -I/usr/local/include -O3 -I../.. -I../../lib -I../../lib/ctype -I../../lib/regexp/ -c field_y.c
field_y.c:335: error: syntax error before "fieldstype"
field_y.c:335: warning: no semicolon at end of struct or union
field_y.c:965: error: syntax error before "fieldstype"
field_y.c: In function `fielddestruct':
field_y.c:975: error: `fieldvaluep' undeclared (first use in this function)
field_y.c:975: error: (Each undeclared identifier is reported only once
field_y.c:975: error: for each function it appears in.)
field_y.c:977: error: `fieldmsg' undeclared (first use in this function)
field_y.c:981: error: `fieldtype' undeclared (first use in this function)
field_y.c: At top level:
field_y.c:1012: error: syntax error before "fieldlval"
field_y.c:1012: warning: data definition has no type or storage class
field_y.c: In function `fieldparse':
field_y.c:1064: error: `fieldstype' undeclared (first use in this function)
field_y.c:1064: error: syntax error before "fieldvsa"
field_y.c:1065: error: `fieldvs' undeclared (first use in this function)
field_y.c:1065: error: `fieldvsa' undeclared (first use in this function)
field_y.c:1066: error: `fieldvsp' undeclared (first use in this function)
field_y.c:1076: error: syntax error before "fieldval"
field_y.c:1153: error: invalid application of `sizeof' to incomplete type `fieldalloc'
field_y.c:1156: error: dereferencing pointer to incomplete type
field_y.c:1156: error: dereferencing pointer to incomplete type
field_y.c:1156: error: invalid application of `sizeof' to incomplete type `fieldalloc'
field_y.c:1156: error: dereferencing pointer to incomplete type
field_y.c:1156: error: invalid use of undefined type `union fieldalloc'
field_y.c:1157: error: dereferencing pointer to incomplete type
field_y.c:1157: error: dereferencing pointer to incomplete type
field_y.c:1157: error: invalid application of `sizeof' to incomplete type `fieldalloc'
field_y.c:1157: error: dereferencing pointer to incomplete type
field_y.c:1157: error: invalid use of undefined type `union fieldalloc'
field_y.c:1277: error: `fieldval' undeclared (first use in this function)
*** Error exit code 1
Stop.
*** Error exit code 1
Stop.
I need help to compile a C program on HP-UX 11.11. I was able successfully compile same program on Linux. Can somebody tell me what should i do based on the error below. I have attached the C program which i am trying to compile. Thanks.
gcc -D_HPUX_SOURCE -I/usr/local/include -O3 -I../.. -I../../lib -I../../lib/ctype -I../../lib/regexp/ -c field_y.c
field_y.c:335: error: syntax error before "fieldstype"
field_y.c:335: warning: no semicolon at end of struct or union
field_y.c:965: error: syntax error before "fieldstype"
field_y.c: In function `fielddestruct':
field_y.c:975: error: `fieldvaluep' undeclared (first use in this function)
field_y.c:975: error: (Each undeclared identifier is reported only once
field_y.c:975: error: for each function it appears in.)
field_y.c:977: error: `fieldmsg' undeclared (first use in this function)
field_y.c:981: error: `fieldtype' undeclared (first use in this function)
field_y.c: At top level:
field_y.c:1012: error: syntax error before "fieldlval"
field_y.c:1012: warning: data definition has no type or storage class
field_y.c: In function `fieldparse':
field_y.c:1064: error: `fieldstype' undeclared (first use in this function)
field_y.c:1064: error: syntax error before "fieldvsa"
field_y.c:1065: error: `fieldvs' undeclared (first use in this function)
field_y.c:1065: error: `fieldvsa' undeclared (first use in this function)
field_y.c:1066: error: `fieldvsp' undeclared (first use in this function)
field_y.c:1076: error: syntax error before "fieldval"
field_y.c:1153: error: invalid application of `sizeof' to incomplete type `fieldalloc'
field_y.c:1156: error: dereferencing pointer to incomplete type
field_y.c:1156: error: dereferencing pointer to incomplete type
field_y.c:1156: error: invalid application of `sizeof' to incomplete type `fieldalloc'
field_y.c:1156: error: dereferencing pointer to incomplete type
field_y.c:1156: error: invalid use of undefined type `union fieldalloc'
field_y.c:1157: error: dereferencing pointer to incomplete type
field_y.c:1157: error: dereferencing pointer to incomplete type
field_y.c:1157: error: invalid application of `sizeof' to incomplete type `fieldalloc'
field_y.c:1157: error: dereferencing pointer to incomplete type
field_y.c:1157: error: invalid use of undefined type `union fieldalloc'
field_y.c:1277: error: `fieldval' undeclared (first use in this function)
*** Error exit code 1
Stop.
*** Error exit code 1
Stop.
Be Teachable
Solved! Go to Solution.
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2005 06:01 AM
12-13-2005 06:01 AM
Solution
You have ported the output of yacc/bison (field_y.c) rather than porting the yacc source (field_y.y?) that generated this C source. If you will instead run the yacc/bison source through the HP-UX version of yacc/bison to generate an HP-UX version of field_y.c, I think your problems will disappear.
If it ain't broke, I can fix that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2005 06:13 AM
12-13-2005 06:13 AM
Re: need help to compile a C program
Clay,
Thanks much for the great TIP. It worked!!!!!!!!!!!!!!!!!!!!
100 points for your answer.
Thanks again.
Thanks much for the great TIP. It worked!!!!!!!!!!!!!!!!!!!!
100 points for your answer.
Thanks again.
Be Teachable
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP