fat dylib and OpenLibrary()

Mac OSX specific forum
User avatar
luis
Addict
Addict
Posts: 3895
Joined: Wed Aug 31, 2005 11:09 pm
Location: Italy

fat dylib and OpenLibrary()

Post by luis »

Does anyone know it if is possible to use from PB a OSX dylib compiled for x86 AND x64 (a FAT or Universal library) ?

for example

Code: Select all

mylib.dylib: Mach-O universal binary with 2 architectures
mylibdylib (for architecture i386):	Mach-O dynamically linked shared library i386
mylib.dylib (for architecture x86_64):	Mach-O 64-bit dynamically linked shared library x86_64
can I use this with OpenLibrary() like it was a "normal" dylib, is there something I need to do in addition or simply it's not possible ?

As you can imagine I'm pretty ignorant on mac-related stuff, at least for now :mrgreen:

Thanks
"Have you tried turning it off and on again ?"
User avatar
luis
Addict
Addict
Posts: 3895
Joined: Wed Aug 31, 2005 11:09 pm
Location: Italy

Re: fat dylib and OpenLibrary()

Post by luis »

@luis

The answer seems to be yes, without the need to do anything special.
"Have you tried turning it off and on again ?"
Fred
Administrator
Administrator
Posts: 18499
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: fat dylib and OpenLibrary()

Post by Fred »

Yes, it should be handled automatically by the OS (that's the whole point of the the universal binary).
User avatar
luis
Addict
Addict
Posts: 3895
Joined: Wed Aug 31, 2005 11:09 pm
Location: Italy

Re: fat dylib and OpenLibrary()

Post by luis »

Thank you, I had time to try it and I can confirm it works.
"Have you tried turning it off and on again ?"
Post Reply