Q: dlopen expected in message is wrong
When I call dlopen("/usr/local/Cellar/cairo/1.12.16_1/lib/libcairo.2.dylib") it returns non-NULL (indicating success).
Then dlopen("/usr/local/Cellar/gtk+/2.24.24/lib/libgdk-x11-2.0.0.dylib") it returns NULL, and dlerror() reports the following.
dlopen(/usr/local/Cellar/gtk+/2.24.24/lib/libgdk-x11-2.0.0.dylib, 10): Symbol not found: _cairo_xlib_surface_create
Referenced from: /usr/local/Cellar/gtk+/2.24.24/lib/libgdk-x11-2.0.0.dylib
Expected in: /usr/local/lib/libcairo.2.dylib
in /usr/local/Cellar/gtk+/2.24.24/lib/libgdk-x11-2.0.0.dylib.
I'm sure that I've set the LD_LIBRARY_PATH environment variable to NOT include /usr/local/lib.
Why does the message tell me that libcairo.2.dylib is expected in /usr/local/lib, when I've successfully loaded it from elsewhere?
Is this just a wrong error message from dlopen? Is it a bug in dlopen?
MacBook Air, OS X El Capitan (10.11.6), null
Posted on Sep 20, 2016 3:39 AM