Operating System - HP-UX
1822731 Members
3738 Online
109644 Solutions
New Discussion юеВ

Re: how to build a C program?

 
Lalo_Weng
Advisor

how to build a C program?

Hi,

I have source code need to rebuild on new 64bit OS. I notice that I have makefiles and source .C files. But how can I perform the rebuild on HP-UX? Which C compiler I need?

Thanks.
Keep finding is the way.
7 REPLIES 7
Leif Halvarsson_2
Honored Contributor

Re: how to build a C program?

Hi
This depends on the source code. There is a simple c compiler bundled with the OS but for more "serious" program development you need the C/ANSI compiler (B3988BA (workstation) or B3901BA (server)).
Leif Halvarsson_2
Honored Contributor

Re: how to build a C program?

U.SivaKumar_2
Honored Contributor

Re: how to build a C program?

Hi,
Search for the README file with the source , which will contain instructions for compiling
the source files.

Edit makefile and customise it according to your requirements. go to the directory where
your source files are located and give make
command.

regards,
U.SivaKumar
Innovations are made when conventions are broken
Olav Baadsvik
Esteemed Contributor

Re: how to build a C program?


Hi,

You say "and source .C files"
As you have used a capital C in .C this
would normally indicate that your source-code
is C++.
In that case you need ansi/c++ compiler and
not the c/ansi-c compiler.

Check if you have the aCC compiler
using this command:

whereis aCC
If you get something like this:

aCC: /opt/aCC/bin/aCC /opt/aCC/share/man/man1.Z/aCC.1

you have the aCC compiler installed

Regards
Olav
benoit Bruckert
Honored Contributor

Re: how to build a C program?

AnSI C Compiler is a good way, but you have to pay for it !!!!
gcc is also possible and you can download it at a portal center (don't forget binutils) this is the compiler that I use most often for many open sources softwares.
About 64 bits, a real 64 bits program mean specific sources where you declare the availability of the high addressing...
If your c files are not specific 64 bits, you don't have to compile them again !!

hth
Benoit
Une application mal pans├йe aboutit ├а une usine ├а gaze (GHG)
V. V. Ravi Kumar_1
Respected Contributor

Re: how to build a C program?

hi,

u may need this.

C-ANSI-C B.11.01.06 HP C/ANSI C Compiler

regds
ravi
Never Say No
Daimian Woznick
Trusted Contributor

Re: how to build a C program?

If you want to go the gcc route, the web site is:

http://gcc.gnu.org/