]> git.saurik.com Git - wxWidgets.git/commitdiff
Darwin dlopen functions is needed both for DYNLIB_CLASS and DYNAMIC_LOADER
authorGilles Depeyrot <gilles_depeyrot@mac.com>
Fri, 22 Feb 2002 21:42:06 +0000 (21:42 +0000)
committerGilles Depeyrot <gilles_depeyrot@mac.com>
Fri, 22 Feb 2002 21:42:06 +0000 (21:42 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14353 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/dynlib.cpp

index fcefd941e3d402c0e05cdbdf1fd2e07950d1f2e5..91981e3061c0e741e145e75f1b6a10a31f9d0c4d 100644 (file)
@@ -416,13 +416,16 @@ wxObject *wxLibraries::CreateObject(const wxString& path)
     return NULL;
 }
 
-#ifdef __DARWIN__
+#endif // wxUSE_DYNLIB_CLASS && !wxUSE_DYNAMIC_LOADER
+
+#if defined(__DARWIN__) && (wxUSE_DYNLIB_CLASS || wxUSE_DYNAMIC_LOADER)
 // ---------------------------------------------------------------------------
 // For Darwin/Mac OS X
 //   supply the sun style dlopen functions in terms of Darwin NS*
 // ---------------------------------------------------------------------------
 
-#import <mach-o/dyld.h>
+#include <stdio.h>
+#include <mach-o/dyld.h>
 
 static char dl_last_error[1024];
 
@@ -494,6 +497,4 @@ void *dlsym(void *handle, const char *symbol)
     return addr;
 }
 
-#endif // __DARWIN__
-
-#endif // wxUSE_DYNLIB_CLASS
+#endif // defined(__DARWIN__) && (wxUSE_DYNLIB_CLASS || wxUSE_DYNAMIC_LOADER)