Operating System - HP-UX
1748159 Members
3805 Online
108758 Solutions
New Discussion юеВ

Re: How to compile on 64 bit machine(HP-UX) using aC++ compiler for 32 bit machine.

 
Ravi Bhave
Occasional Contributor

How to compile on 64 bit machine(HP-UX) using aC++ compiler for 32 bit machine.

Hi,

I am having problems to compile my application on 64 bit machine(PA RISC 2) to run on 32 bit machine(PA-RISC 1).
I am compiling my application on 64 bit machine using +DA1.1 and +DAPortable flags.(as per the online HP corss platform development documentation)
I also tried DAPortable+ and DS2.0 -N flags (as suggested earlier in this forum)

The errors I am getting are:
"aCC: warning 7000: Model number is unknown will defalut to 1.1b code generation(7000)."
/usr/ccs/bin/ld: (Warning) At least one PA2 object file (su9_prt.o) was detected. The linked output may not work on PA 1.x system.

su9_prt is my C++ program which compiles and works fine on 64 bit machine.

Please help.

Thanks in advance.
Ravi
4 REPLIES 4
Govind
Frequent Advisor

Re: How to compile on 64 bit machine(HP-UX) using aC++ compiler for 32 bit machine.

Hey Ravi
Did you try to setting up the variable OBJECT_MODE to 32 before compiling?
Regards
Govind
Dont try to fix something till it Aint Broke...Honesty is not always the best policy.....
Ravi Bhave
Occasional Contributor

Re: How to compile on 64 bit machine(HP-UX) using aC++ compiler for 32 bit machine.

Thanks for prompt reply. However can you help me to set the variable OBJECT_MODE.
Thanks again.
Ravi
susan gregory
Advisor

Re: How to compile on 64 bit machine(HP-UX) using aC++ compiler for 32 bit machine.

Hi Ravi,
The compiler directive +DA1.1 should be all you need.
If you are getting a warning about unknown model number you may have a problem with your model output not matching anything in your /opt/langtools/lib/sched.models file, although the error or problem could be caused by a typo. The correct flag to pass is +DAportable (no capital "P" on portable).
Since you are getting the warning about "at least one PA2.0 object detected" and the file it is pointing to su9_prt.o, that would imply that the link didn't default to PA1.1 after all.
You can use the 'file' command to see if su9_prt.o is PA1.1 or PA2.0.
Also, are you linking with the "aCC" command rather than linking with the "ld" command? The aC++ product does require that you use aCC to link.
Stanimir
Trusted Contributor

Re: How to compile on 64 bit machine(HP-UX) using aC++ compiler for 32 bit machine.

Hi!
This message mean that you build application on PA2.0.
To create portable code that also be run on PA1.1, the compiler option +DAportable must be used for ALL objects loaded into the executable.

Regards,Stan :)