Opened 20 years ago
Last modified 6 years ago
#1936 closed defect
BUG: devel/mono doesn't look in /opt/local/lib at runtime — at Initial Version
Reported by: | chris.ridd@… | Owned by: | darwinports-bugs@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 1.0 |
Keywords: | Cc: | ||
Port: | mono |
Description
The mono-config file included by devel/gtk-sharp maps 'libgtk-win32-2.0.0.dll' to 'libgtk-x11 -2.0.0.dylib', however an application using Gtk fails to load the dylib. This is because it appears to look for the dylib in the paths "", "/usr/local/lib", "/lib", "/usr/lib" and "." (and then across those paths in reverse order, Just In Case.)
If I set DYLD_LIBRARY_PATH to /opt/local/lib, the dylib is located correctly.
% mcs helloworld.cs -L /opt/local/lib/mono/gtk-sharp -r gtk-sharp.dll -r glib-sharp.dll Compilation succeeded % unsetenv DYLD_LIBRARY_PATH % mono helloworld.exe
Unhandled Exception: System.DllNotFoundException: libgtk-win32-2.0-0.dll in <0x000dc> (wrapper managed-to-native) Gtk.Application:gtk_init (int&,intptr&) in <0x0004c> Gtk.Application:Init () in <0x0001c> Hello:Main ()
% setenv DYLD_LIBRARY_PATH /opt/local/lib % mono helloworld.exe (it works)