]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/dynlib.h
1. wxMSW seems to work (please test and send your bug reports!)
[wxWidgets.git] / include / wx / dynlib.h
index 0419db3579b7d0c287a1f652b6a1a3bd5c379839..98bc1839a60e1c62607d3cedc4d4f1a8644f914a 100644 (file)
     #pragma interface
 #endif
 
+#include <wx/setup.h>
+
+#if wxUSE_DYNLIB_CLASS
+
 #include <wx/string.h>
 #include <wx/list.h>
 #include <wx/hash.h>
 
-// TODO should be done by configure
-#if defined(__UNIX__) && !(defined(HAVE_DLOPEN) || defined(HAVE_SHLLOAD))
+// this is normally done by configure, but I leave it here for now...
+#if defined(__UNIX__) && !(defined(HAVE_DLOPEN) || defined(HAVE_SHL_LOAD))
     #if defined(__LINUX__) || defined(__SOLARIS__) || defined(__SUNOS__) || defined(__FREEBSD__)
         #define HAVE_DLOPEN
     #elif defined(__HPUX__)
-        #define HAVE_SHLLOAD
+        #define HAVE_SHL_LOAD
     #endif // Unix flavour
 #endif // !Unix or already have some HAVE_xxx defined
 
     #include <dlfcn.h>
 
     typedef void *wxDllType;
-#elif defined(HAVE_SHLLOAD)
+#elif defined(HAVE_SHL_LOAD)
     #include <dl.h>
 
-    typedef void *wxDllType;
+    typedef shl_t wxDllType;
 #elif defined(__WINDOWS__)
     #include <windows.h>
 
@@ -62,7 +66,7 @@ public:
     wxHashTable classTable;
 
 public:
-    wxLibrary(void *handle);
+    wxLibrary(wxDllType handle);
     ~wxLibrary();
 
     // Get a symbol from the dynamic library
@@ -112,4 +116,6 @@ wxClassInfo *wxGetClassFirst() { \
   return wxClassInfo::GetFirst(); \
 }
 
+#endif // wxUSE_DYNLIB_CLASS
+
 #endif // _WX_DYNLIB_H__