/* get the full name of a module if available, and the short name otherwise*/
#define MODNAME(x) ((x)->lib_name)
-/* Which path should FindLibrary search? */
-#if defined(__APPLE__)
-#define LIBSEARCHPATH "DYLD_LIBRARY_PATH"
-#else
-#define LIBSEARCHPATH "LD_LIBRARY_PATH"
-#endif
-
#define LIBC_NAME_WITHOUT_EXTENSION "libc"
/* static variables ***********************************************************/
IntPtr lib = IntPtr.Zero;
if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
{
- NativeLibrary.TryLoad("libgdiplus.dylib", assembly, default, out lib);
+ if (!NativeLibrary.TryLoad("libgdiplus.dylib", assembly, default, out lib))
+ {
+ NativeLibrary.TryLoad("/usr/local/lib/libgdiplus.dylib", assembly, default, out lib);
+ }
}
else
{
// the name suffixed with ".0".
if (!NativeLibrary.TryLoad("libgdiplus.so", assembly, default, out lib))
{
- NativeLibrary.TryLoad("libgdiplus.so.0", assembly, default, out lib);
+ NativeLibrary.TryLoad("libgdiplus.so.0", assembly, default, out lib);
}
}
[DllImport(LibraryName, ExactSpelling = true)]
internal static extern int GdipGetPostScriptGraphicsContext(
- [MarshalAs(UnmanagedType.LPStr)]string filename,
+ [MarshalAs(UnmanagedType.LPStr)] string filename,
int width, int height, double dpix, double dpiy, ref IntPtr graphics);
[DllImport(LibraryName, ExactSpelling = true)]