#pragma hdrstop
#endif
-#if wxUSE_DYNLIB_CLASS
+#if wxUSE_DYNLIB_CLASS && !wxUSE_DYNAMIC_LOADER
#if defined(__WINDOWS__)
#include "wx/msw/private.h"
#include "wx/intl.h"
#include "wx/log.h"
+#if defined(__WXMAC__)
+ #include "wx/mac/private.h"
+#endif
+
// ----------------------------------------------------------------------------
// conditional compilation
// ----------------------------------------------------------------------------
# define wxDllGetSymbol(handle, name) ::GetProcAddress(handle, name)
# define wxDllClose ::FreeLibrary
#elif defined(__WXMAC__)
-# define wxDllClose(handle) CloseConnection(&handle)
+# define wxDllClose(handle) CloseConnection(&((CFragConnectionID)handle))
#else
# error "Don't know how to load shared libraries on this platform."
#endif // OS
kCFragGoesToEOF,
"\p",
kPrivateCFragCopy,
- &handle,
+ &((CFragConnectionID)handle),
&myMainAddr,
myErrName ) != noErr )
{
wxString msg(_("Failed to load shared library '%s'"));
#ifdef HAVE_DLERROR
- wxChar *err = dlerror();
+ const wxChar *err = dlerror();
if( err )
{
failed = TRUE;
strcpy( (char *) symName, name );
c2pstr( (char *) symName );
#endif
- if( FindSymbol( dllHandle, symName, &symAddress, &symClass ) == noErr )
+ if( FindSymbol( ((CFragConnectionID)dllHandle), symName, &symAddress, &symClass ) == noErr )
symbol = (void *)symAddress;
#elif defined(__WXPM__) || defined(__EMX__)
wxString msg(_("wxDllLoader failed to GetSymbol '%s'"));
#ifdef HAVE_DLERROR
- wxChar *err = dlerror();
+ const wxChar *err = dlerror();
if( err )
{
failed = TRUE;