Operating System - HP-UX
1833883 Members
1840 Online
110063 Solutions
New Discussion

Re: C program to compile on HP-UX

 
john_467
Occasional Contributor

C program to compile on HP-UX

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.
8 REPLIES 8
vasundhara
Frequent Advisor

Re: C program to compile on HP-UX

Hi,

You can use the c compiler to compile the program. But, I think, you have to uncomment the "include"s in u r file.

For compiling any C Program, use

%cc

%cc sms.c

The executable is a.out in that directory where you have compiled.
john_467
Occasional Contributor

Re: C program to compile on HP-UX

Thx but can you possibly help to compile & attach the object for me.
kind regards,
vasundhara
Frequent Advisor

Re: C program to compile on HP-UX

Hi,

If it is very urgent I can not do it now. But, I will try to do that at the earliest and send it.

Regards
VJ.
Jean-Louis Phelix
Honored Contributor

Re: C program to compile on HP-UX

Hi,

I don't know if it works, but you can compile attached files with 'make sms smsreplyd'

Regards.
It works for me (© Bill McNAMARA ...)
Jean-Louis Phelix
Honored Contributor

Re: C program to compile on HP-UX

I had forgotten that I can only attach one file at a time ...
It works for me (© Bill McNAMARA ...)
Victor BERRIDGE
Honored Contributor

Re: C program to compile on HP-UX

Hi,
I just tested Jean-Louis's files they compile fine on a K360 under 10.20 with mentions about maybe not being able to run on PA1.1...
You will have to remove the initial blanks in Jean-Louis's code in order to have no errors
Do exactly what he said:
# make sms smsreplyd
`sms' is up to date.
cc -O smsreplyd.c -o smsreplyd
/usr/ccs/bin/ld: (Warning) At least one PA 2.0 object file (smsreplyd.o) was detected. The linked output may not
run on a PA 1.x system.
deimos #

All the best

Victor
vasundhara
Frequent Advisor

Re: C program to compile on HP-UX

Hi,

In your code "//" are used for comments. But, you have to use "/* comment*/" for comments. And some more usage problems... Please find the corrected code. I could compile the files with cc and a.out is generated.

Regards
VJ.
vasundhara
Frequent Advisor

Re: C program to compile on HP-UX

Here is the other file...