Operating System - HP-UX
1834018 Members
1980 Online
110063 Solutions
New Discussion

Help compiling c code into "PA-RISC1.1 shared executable dynamically linked -not stripped" files

 
SOLVED
Go to solution
TechC
Regular Advisor

Help compiling c code into "PA-RISC1.1 shared executable dynamically linked -not stripped" files

Hi list,
I have a HP-UX 10.20 box that I want to move to 11.11.
This box uses cgi scripts for the http installation that are "PA-RISC1.1 shared executable dynamically linked -not stripped" files when I issue the file command against them.
I do have the c code and I need to make some changes to it because some paths need to be changed to reflect the new environment. After that I need to recompile it back into PA-RISC shared executables.

What commands do I use to turn these .c files into PA-RISC shared executables?

I obviously am not a programmer but I just need to change hard set paths in the c code and recompile them. Can you help me?
I am pretty lost here, I assume the cc command should be used but not sure.

Thank you
James
5 REPLIES 5
Dennis Handly
Acclaimed Contributor

Re: Help compiling c code into "PA-RISC1.1 shared executable dynamically linked -not stripped" files

Are your executables composed of single source C files?
Do you have the C compiler installed or the bundled C compiler?
For the simple case, you should be able to use:
$ cc -o executable foo.c
TechC
Regular Advisor

Re: Help compiling c code into "PA-RISC1.1 shared executable dynamically linked -not stripped" files

Dennis,
Thank you for responding.
I have what look to be single c source files.
so I have a cgi script named brakes.cgi and I found the c source code named brakes.c

For the C compiler I believe it is the bundled or "standard issue" C compiler.
I found a string I think was used to compile the original cgi scripts from the c code.
It is...
"cc -Aa -g cgia.c license.c -lm -o cgia

From the man page it looks like -Aa is saying use ANSI mode. -g is to generate info for the symbolic debugger. I understand that -o cgia is outputting cgia as the executable.

But can you help me to understand what the -lm does. It says something similar to "resolve unresolvable external references"
I am not sure what to make of that.

Thank you again
Dennis Handly
Acclaimed Contributor

Re: Help compiling c code into "PA-RISC1.1 shared executable dynamically linked -not stripped" files

>For the C compiler I believe it is the bundled

The bundled C compiler on PA will not support -Aa nor -g.

>But can you help me to understand what the -lm does.

It links in libm so you can call functions like sin(3).

TechC
Regular Advisor

Re: Help compiling c code into "PA-RISC1.1 shared executable dynamically linked -not stripped" files

Dennis thanks again.
OK thanks for the heads up on the -lm.
How can I get the c compiler I am looking for?
Is it simply downloadable from ITRC in .depot format.

Thank you
James
Dennis Handly
Acclaimed Contributor
Solution

Re: Help compiling c code into "PA-RISC1.1 shared executable dynamically linked -not stripped" files

>How can I get the C compiler I am looking for?

If your code is simple, you can attempt using the bundled compiler.

>Is it simply downloadable from ITRC in .depot format.

You have to purchase it. There is an evaluation copy available:
http://h21007.www2.hp.com/portal/site/dspp/menuitem.863c3e4cbcdc3f3515b49c108973a801/?ciid=e9083a7373f021103a7373f02110275d6e10RCRD