Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

can't compile with cc

Status
Not open for further replies.

alfonsogt

Programmer
Aug 25, 2000
8
ES
Dear friends: I got a HP-270 server with HP-UX installed on it. I'm new to this of HP-UX (not in linux!); it seems to have a c-compiler named 'cc'. The problem is that if I try to compile a simply 'Hello World' program, it says:

(Bundled) cc: "hello.c", line 3: error 1705: Function prototypes are an ANSI .

do anyone of you know to solve this??
 
A stock HP-UX installation has a crippled C compiler bundled with it. I can't remember the full details of what it can't do, but I think one of them is ANSI compiles.

If this is your own server, or your company doesn't want to get the corporate cheque book out, your probably best off getting hold of gcc and installing that.
 
To compile C programs under ANSI mode, use the option -Aa.

e.g. cc -Aa -ohello hello.c
 
no blue -- the HP bundled compiler is not ANSI compatible -- wish it was
 
Mike,

Perhaps we are using different products. Mine is "HP C/ANSI C Developer's Bundle", Product# B3901BA.
 
Yes blue, think we probably are. On my system the command:
Code:
cc -Aa
prints
Code:
(Bundled) cc: warning 480: The -A option is available only with the C/ANSI C product; ignored.
 
Yes Mike, same problem... where can I get gcc for HP/UX?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top