From: Gilles Depeyrot Date: Fri, 22 Feb 2002 21:42:06 +0000 (+0000) Subject: Darwin dlopen functions is needed both for DYNLIB_CLASS and DYNAMIC_LOADER X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/229d3f1c1fac88569a94b7a22fdc3149d57a46d4?hp=dbb846c622d630b2711eb4a0134af238a1d08431 Darwin dlopen functions is needed both for DYNLIB_CLASS and DYNAMIC_LOADER git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14353 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/common/dynlib.cpp b/src/common/dynlib.cpp index fcefd941e3..91981e3061 100644 --- a/src/common/dynlib.cpp +++ b/src/common/dynlib.cpp @@ -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 +#include +#include 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)