Operating System - HP-UX
1753599 Members
6341 Online
108796 Solutions
New Discussion юеВ

Re: C program to Compile on HP-Unix

 
SOLVED
Go to solution
john_467
Occasional Contributor

C program to Compile on HP-Unix

I am new to HP system.
Please kindly help me to compile the attached programs for a HP-UX mbnair B.10.20
The programs are simple socket related programs
Thank you for your help.
5 REPLIES 5
A. Clay Stephenson
Acclaimed Contributor

Re: C program to Compile on HP-Unix

You will almost certainly have better luck if you attach the source code as text. Very few people are going to trust unzipping a file.

One note: If your code is ANSI C and you don't have the optional ANSI C compiler (or gcc) then you are probably out of luck. The base compiler speaks only K&R and is really intended for building kernels and very simple c development.
If it ain't broke, I can fix that.
David Ritchie
Frequent Advisor

Re: C program to Compile on HP-Unix


I am puzzled why someone would be reluctant to open a
.zip file - it is just an archive, not an executable.

The contents of the zip file is 2 .c files - no virus risk
there. Compiling is not a risk
eather - running the program
is where the 'risk' would be.
(I would recommend not running as root in this kind
of situation).

Oh you wanted a solution? Have you considered loading
gcc for PA-RISC and compiling
it on your local machine? Otherwise, how are you going
to make changes to this in
the future?

-- Dave Ritchie
Jean-Paul Marinier
New Member
Solution

Re: C program to Compile on HP-Unix


If you have not paid for the commercial C compiler, then it is not there, and you have only a minimal C compiler under /usr/bin/cc. The commercial C compiler, if available, lives under /opt/ansic/bin/cc

In that situation, a workaround consists in downloading a precompiled version of GCC from:

http://hpux.cs.utah.edu

BTW 10.20 is only supported by HP till end June 2003 I think.

Best regards,

Jean-Paul Marinier
Victor BERRIDGE
Honored Contributor

Re: C program to Compile on HP-Unix

You had the solution to your compilation problem you already posted:
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xfc538b82cc91d711abdc0090277a778c,00.html

So mentionned to compile for you are using ANSI options you will not be able to compile with the default cc compiler, if you arent going to buy HP ACC, ther only solution is to get GNU C compiler (gcc) at one of the Porting Archive center such as:
http://hpux.connect.org.uk/hppd/hpux/Gnu/gcc-3.2/
But you will have to compile the source or look if someone can route you to a 10.20 binaries


All the best

Victor
john_467
Occasional Contributor

Re: C program to Compile on HP-Unix

Hi guys,
I've download gcc & compiling these programs are like seeking honey in the rock. I've successfully compiled the same on AIX & Unixware without this trouble.
Pls., I need some help here. If possible can some just compile & send me the objects. You don't need to execute if there is any fear.
The codes are to receive text messages & to send text messages.
Pls, I need the help in form of compiled object.
Thank you in advance.
Regards