[NTLUG:Discuss] Solved: [Was: Re: OT - compiling 64 bit on Solaris 10 question

Fred James fredjame at fredjame.cnc.net
Thu Oct 2 15:42:54 CDT 2008


Fred James wrote:
>> All
>> Currently using ...
>>     to compile ...
>>        cc -c filename.c
>>     to link
>>        ld -G -o filename.so filename
>> ... and getting a 32 bit result, when I need a 64 bit result.
>> Thank you in advance for any pointers you may be able to offer
>>     
All
The turned out to be multi part
(a) set LD_LIBRARY_PATH for the SUN 64 bit libraries
(b) cc -xarch=v9 -xcode=p13 -c filename.c
(c) ld -64 -G -o filename.so filename.o
Note that (at least on this system*)
    -m64 is an illegal option
    -xcode=p13 is supposed to be preferred over -xcode=abs64, for better 
memory usage
        however -xcode=abs64 does work as well, at least for compiling
   -64 seems (at least at this point) to be optional
I do appreciate the help I received - thank you very much - and I wanted 
to share this in case of interest
Regards
Fred James

*System SUN Solaris 10 on Sparc-Enterprise-T1000, Sun C 5.8 2005/10/13




More information about the Discuss mailing list