Page 1 of 1

fat dylib and OpenLibrary()

Posted: Mon Oct 28, 2013 3:41 pm
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

Re: fat dylib and OpenLibrary()

Posted: Mon Oct 28, 2013 8:17 pm
by luis
@luis

The answer seems to be yes, without the need to do anything special.

Re: fat dylib and OpenLibrary()

Posted: Tue Oct 29, 2013 11:19 am
by Fred
Yes, it should be handled automatically by the OS (that's the whole point of the the universal binary).

Re: fat dylib and OpenLibrary()

Posted: Tue Oct 29, 2013 11:30 am
by luis
Thank you, I had time to try it and I can confirm it works.