Operating System - HP-UX
1754339 Members
3277 Online
108813 Solutions
New Discussion юеВ

HP-UX11i V2: Compile C programs as 32 bit

 
SOLVED
Go to solution
kenny chia
Regular Advisor

HP-UX11i V2: Compile C programs as 32 bit

Hi all
For HPUX11i version 2, can I compile C programs as a 32 bit binary?
All Your Bases Are Belong To Us!
3 REPLIES 3
raghu_14
Advisor
Solution

Re: HP-UX11i V2: Compile C programs as 32 bit

Hi Kenny,
yes, by default the HP-UX C compiler (without
+DDdata_model option) generates a 32bit code.
If one need to build a 64bit binary, then he needs to use the +DDdata_model option. Please read cc(1) manpage for details.

Cheers,
raghu
A ship in the harbor is safe, but that is not what ships are built for.
Florian Heigl (new acc)
Honored Contributor

Re: HP-UX11i V2: Compile C programs as 32 bit

with gcc setting -n32 should achieve the system, I think.
yesterday I stood at the edge. Today I'm one step ahead.
Amit Agarwal_1
Trusted Contributor

Re: HP-UX11i V2: Compile C programs as 32 bit

Use +DD32 option.