Added code to look up main program symbols - unix only. PLEASE FIX FOR MSW.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2931 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Karsten Ballüder
1999-06-29 17:04:57 +00:00
parent bf6c2b3505
commit 0868079c33
2 changed files with 17 additions and 1 deletions

View File

@@ -40,7 +40,7 @@
// ----------------------------------------------------------------------------
#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)
@@ -172,6 +172,19 @@ void *wxLibrary::GetSymbol(const wxString& symbname)
// wxDllLoader
// ---------------------------------------------------------------------------
/* static */
wxDllType
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)