- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Problem compiling a C program
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
Forums
Discussions
Discussions
Discussions
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
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
05-11-2001 12:56 PM
05-11-2001 12:56 PM
Needed to make some minor changes. Now, I cannot compile it. I am getting the following error at every function declaration.
(Bundled) cc: "mg.c", line 241: error 1705: Function prototypes are an ANSI feature.
Does anyone know, how this bundled CC is different from the regular CC.
Please help.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2001 01:04 PM
05-11-2001 01:04 PM
Re: Problem compiling a C program
If you are doing any even moderately serious development you are going to have the purchase the ANSI C compiler or the aCC compiler (which also does C++). The other option is gcc available for one of the HP-UX porting centers or from www.gnu.org.
Regards, Clay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2001 03:55 AM
05-14-2001 03:55 AM
Re: Problem compiling a C program
I.E.
cc -Aa -o ouput.exe myprog.c
It may work if you compiled previously with the K&R compiler and not ANSI.
For allignment and performance it is well worth the HP ANSI/C bundle though, and will remove this error. My only complaint about ANSI/C is that it does not support new style comments....
Regards,
Shannon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2001 06:11 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2001 10:15 AM
05-14-2001 10:15 AM
Re: Problem compiling a C program
Looks like you are putting me in the right track. Most of my errors went away, when I have changed the way you have suggested, by changing the function definition.
I am still having the compilation errors with the main() function.
My code says :
main(int argc, char *argv[]){
....
}
Could you please tell me what would be the syntax in K&R. I am expecting 3 or 4 parameters to the program.
Thanks for your help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2001 10:18 AM
05-14-2001 10:18 AM
Re: Problem compiling a C program
The K&R syntax for main is
int main(argc,argv)
int argc;
char *argv[];
{
....
....
}
But again, this is not a very good development environment for anything serious.
Clay