#include "wx/wxprec.h"
-#ifdef __BORLANDC__
-# pragma hdrstop
-#endif //__BORLANDC__
+#ifdef __BORLANDC__
+ #pragma hdrstop
+#endif
#if wxUSE_DYNLIB_CLASS
// ----------------------------------------------------------------------------
#if defined(HAVE_DLOPEN)
-# define wxDllOpen(lib) dlopen(lib.fn_str(), RTLD_LAZY)
+# define wxDllOpen(lib) dlopen(lib.fn_str(), RTLD_NOW/*RTLD_LAZY*/)
# define wxDllGetSymbol(handle, name) dlsym(handle, name.mb_str())
# define wxDllClose dlclose
#elif defined(HAVE_SHL_LOAD)
/* static */
wxDllType
-wxDllLoader::LoadLibrary(const wxString & libname, bool *success)
+wxDllLoader::GetProgramHandle(void)
+{
+#ifdef __WXGTK__
+ return dlopen(NULL, RTLD_NOW/*RTLD_LAZY*/);
+#else
+#pragma warning "Not implemented, please fix!"
+ return 0;
+#endif
+}
+
+
+/* static */
+wxDllType
+wxDllLoader::LoadLibrary(const wxString & lib_name, bool *success)
{
wxASSERT(success);
if ( !symbol )
{
wxLogSysError(_("Couldn't find symbol '%s' in a dynamic library"),
- symbname.c_str());
+ name.c_str());
}
return symbol;
}
#endif // __UNIX__
#endif
- bool success;
- handle = wxDllLoader::LoadDll(lib_name, &success);
+ bool success = FALSE;
+ wxDllType handle = wxDllLoader::LoadLibrary(lib_name, &success);
if(success)
{
lib = new wxLibrary(handle);