gSystem->Load() problem on Mac OS X


I have a question concerning the gSystem->Load() command on Mac OS X.
Why it is not possible to load external libraries with the extension .dylib, which is the standard on Mac OS X?
Is there any good reason for this?
I can create symbolic links from *.so to *.dylib to overcome the problem,
but i don’t like to do this if this is not absolutly necessary.

Is it possible to extent TUnixSystem::DynamicPathName to have the possibilty to load dylib libraries?



Fons will process your mail once he will be online (somewhere in India)


Hi Florian,

there is a very good reason :slight_smile:

The .dylib extension is only for dynamic shared libraries which cannot be loaded at runtime via dlopen(). Dynamically loaded libraries have the extension .so and that is the only extension accepted by dlopen(). So you need to use symlinks (as we do for ROOT). However, if you are running Leopard, you can now name the .dylib’s to .so’s and this is now accepted both by ld and dlopen(). Apple finally coming to the mainstream.

Cheers, Fons.