Operating System - HP-UX
1750505 Members
5093 Online
108777 Solutions
New Discussion юеВ

Mixing 32-bit & 64-bit libraries

 
SOLVED
Go to solution
Donatoll
Occasional Contributor

Mixing 32-bit & 64-bit libraries

Hello!
It's possible to compile a program linking sametime with 32-bit and 64-bit libraries?

I think it's not possible, but i ask it 'cause I can't ensure it.

Thanks in advance!
4 REPLIES 4
Srimalik
Valued Contributor
Solution

Re: Mixing 32-bit & 64-bit libraries

No, you can not do it.
If you application is 32 it can be linked only with 32 bit libs and 64 bit app can be linked with 64bit libs.

If you try to mix you will get Errors while linking.

-Sri
abandon all hope, ye who enter here..
Steven E. Protter
Exalted Contributor

Re: Mixing 32-bit & 64-bit libraries

Shalom,

If you want to use a library providing a particular function, call it function schmo, and its provided by 32 bit and 64 bit libraries, you must make a choice.

Memory management for 32 and 64 bit libraries are different, and I'd say in general if you need a 32 bit library you should stay pure 32 bit.

Obviously since the world is going 64 bit, you are better off long term and from the development cost perspective to go pure 64 bit.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Dennis Handly
Acclaimed Contributor

Re: Mixing 32-bit & 64-bit libraries

As Srikrishan and SEP have said, you can't mix architectures. There is talk about doing magic in Aries but that is in the future.

You'll need to figure out what is the common bit size of any third party libs you are using.

Note the default is +DD32 on HP-UX and will probably stay that way until 128 bit machines come along. If you don't need that large address space, you may want to stay with 32 bit.
Donatoll
Occasional Contributor

Re: Mixing 32-bit & 64-bit libraries

Thankis a lot people!
I really was asking a question with no sense.

Best regards!