#include "wx/setup.h"
-#if wxUSE_DYNLIB_CLASS
+#if wxUSE_DYNAMIC_LOADER
+
+#include "wx/dynload.h" // Use the new (version of) wxDynamicLibrary instead
+
+#elif wxUSE_DYNLIB_CLASS
#include "wx/string.h"
#include "wx/list.h"
if success pointer is not NULL, it will be filled with TRUE if everything
went ok and FALSE otherwise
*/
- static wxDllType LoadLibrary(const wxString& libname, bool *success = NULL);
+ static wxDllType LoadLibrary(const wxString& libname, bool *success = 0);
/*
This function unloads the shared library previously loaded with
Returns the pointer to the symbol or NULL on error.
*/
- static void * GetSymbol(wxDllType dllHandle, const wxString &name);
+ static void *GetSymbol(wxDllType dllHandle,
+ const wxString &name,
+ bool *success = NULL);
// return the standard DLL extension (with leading dot) for this platform
- static wxString GetDllExt();
+ static const wxString &GetDllExt() { return ms_dllext; }
private:
// forbid construction of objects
wxDllLoader();
+ static const wxString ms_dllext;
};
// ----------------------------------------------------------------------------
// Global variables
// ----------------------------------------------------------------------------
-extern wxLibraries wxTheLibraries;
+extern WXDLLEXPORT_DATA(wxLibraries) wxTheLibraries;
// ----------------------------------------------------------------------------
// Interesting defines
// ----------------------------------------------------------------------------
#define WXDLL_ENTRY_FUNCTION() \
-extern "C" wxClassInfo *wxGetClassFirst(); \
-wxClassInfo *wxGetClassFirst() { \
+extern "C" WXEXPORT const wxClassInfo *wxGetClassFirst(); \
+const wxClassInfo *wxGetClassFirst() { \
return wxClassInfo::GetFirst(); \
}