Re: compilation for 64-bit machine



niteshkpatil@xxxxxxxxx wrote:
when I run the file command on the library component, it shows the
following message,

%file libtest.a
%libtest.a : archive file -PA-RISC2.0 relocatable library

it is just 32-bit then. using the HP ANSI compiler on hello world shows:

$ cc -c hello.c
$ file hello.o
hello.o: PA-RISC2.0 relocatable object
$ cc +DD64 -c hello.c
$ file hello.o
hello.o: ELF-64 relocatable object file - PA-RISC 2.0 (LP64)

$ cc -o hello hello.c
/usr/ccs/bin/ld: (Warning) At least one PA 2.0 object file (hello.o) was detected. The linked output may not run on a PA 1.x system.
$ file hello
hello: PA-RISC2.0 shared executable dynamically linked -not stripped
$ cc +DD64 -o hello hello.c
$ file hello
hello: ELF-64 executable object file - PA-RISC 2.0 (LP64)

Basically, 64-bit objects/executables/libraries will say ELF... You
can check that out on some of the supplied libraries on the system
under /usr/lib etc...

rick jones
--
denial, anger, bargaining, depression, acceptance, rebirth...
where do you want to be today?
these opinions are mine, all mine; HP might not want them anyway... :)
feel free to post, OR email to rick.jones2 in hp.com but NOT BOTH...
.