Page 1 of 1

dlopen on Library Works on OSX 10.5 and 10.6 but not 10.7

Posted: Thu Nov 03, 2011 5:51 pm
by Xangis
I have a dynamic library called screens.so that contains my wxWidgets dialogs. It works great on Linux, OSX 10.5 Leopard, and OSX 10.6 Snow Leopard.

On OSX 10.7 Lion it fails to find the wx libraries when opening my screens with dlopen:

ERROR: Unable to open screens.so: dlopen(screens.so, 2): Library not loaded: /usr/lib/libwx_macud-2.8.0.dylib
Referenced from: <app directory>/screens.so
Reason: image not found

It's currently built against the wx libs that ship with 10.5. Is it possible to make the same app build work on all 3 versions of OSX? Any setting I can change?

I've been trying to avoid building wx from scratch and static linking because it makes for a larger executable and is a bit of a chore to get right, but I can if I have to.

Re: dlopen on Library Works on OSX 10.5 and 10.6 but not 10.

Posted: Thu Dec 15, 2011 6:51 pm
by Xangis
Simple, stupid solution that I should have noticed to begin with:

OSX 10.7 does not ship with wxWidgets libraries, so it couldn't find them.