Quote:
Originally Posted by
rein
Is it possible to compile the same source code on 32bit and 64bit systems?
Yes *if*
1. the code supports a 64bit environment and
2. the code detects the appropriate defines, for example "_LP64".
3. doesn't make silly assumptions about length of "long", see 1 and 2.
4. all libraries that it needs are available in 64 bit mode.
I've used gcc on DEC-Alpha, 64 bit UltraSparc-II and 64 bit PA-Risc-2 without problem, also gcc is used by Apple for 64 bit G5 Macintoshes.
64 bit AIX uses dual shared libraries which contain both 32 bit code(shr.o) and 64 bit code(shr64.o), so the link should fail if the correct type is not available.