pandey5
asked on
32 bit - 64 bit
Hi,
I am on a HP-UX 11.11.
How can i know if my machine is 32 bit or 64 bit?
If i create a exe in 64 bit, how can i verify that it is indeed 64 bits.
Thanks,
I am on a HP-UX 11.11.
How can i know if my machine is 32 bit or 64 bit?
If i create a exe in 64 bit, how can i verify that it is indeed 64 bits.
Thanks,
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for the answers, it completely answers my question. 1 more question though:
If i am linking many libraries in my application and not all are 64 bit, will the linker complain about 32 bit libs if i compile and link in 64 bit mode.
If i am linking many libraries in my application and not all are 64 bit, will the linker complain about 32 bit libs if i compile and link in 64 bit mode.
pandey5,
yes ... 32 bit libraries cannot be linked with 64 bit code and 64 bit libraries cannot be linked with 32 bit code ...
both need to have same word length
Sunnycoder
yes ... 32 bit libraries cannot be linked with 64 bit code and 64 bit libraries cannot be linked with 32 bit code ...
both need to have same word length
Sunnycoder
ASKER
One question, may be it is straight forward to you, when i am trying to create a shared library from the 64 bit compiled objects:
/opt/aCC/bin/aCC +DD64 -AA -D__HPACC_THREAD_SAFE_RB_T REE -mt -DRWSTD_MULTI_THREAD -DRW_MULTI_THREAD -D_REENTRANT -D_THREAD_SAFE -Wl,+n -Wl,+s -Wl,+k -Wl,+n -b -o ~/proj/bfebv30_1/lib/libbf ebill.sl *.o
i am getting the following error:
/usr/ccs/bin/ld: EB_GeneralInfo.o: Mismatched ABI. 64-bit PA object file found in 32-bit link.
How can i force it to do 64 bit linkage? I gave all the options i am supposed to give....
/opt/aCC/bin/aCC +DD64 -AA -D__HPACC_THREAD_SAFE_RB_T
i am getting the following error:
/usr/ccs/bin/ld: EB_GeneralInfo.o: Mismatched ABI. 64-bit PA object file found in 32-bit link.
How can i force it to do 64 bit linkage? I gave all the options i am supposed to give....
gcc provides some options for hardware specific configuration (including 64/32 bits) ...
Look into the hardware specific options and linking options subsection in the manual for your compiler to see the exact options available to you
Look into the hardware specific options and linking options subsection in the manual for your compiler to see the exact options available to you
liddler has posted the solution ... still take a look at
http://servdoc.sourceforge.net/docs/pod/ServDoc_0010hardware--hpux.pod.html
the script gives you little more info in a good format
Sunnycoder