Skip to content
Permalink
Browse files
Fix to allow compilation on windows and OSX
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@4959 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
g_j_m committed Mar 3, 2006
1 parent 1fe9b59 commit a017ec097f36a911ead7ec41a0483b5b9fd7e6c4
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/gui/qgspluginmanager.cpp
@@ -88,6 +88,8 @@ sharedLibExtension = "*.so*";
std::cout << "PLUGIN MANAGER:" << std::endl;
for (unsigned i = 0; i < pluginDir.count(); i++)
{
QString lib = QString("%1/%2").arg(txtPluginDir->text()).arg(pluginDir[i]);

#ifdef TESTLIB
// This doesn't work on WIN32 and causes problems with plugins
// on OS X (the code doesn't cause a problem but including dlfcn.h
@@ -97,7 +99,7 @@ sharedLibExtension = "*.so*";
// This doesn't work on WIN32 and causes problems with plugins
// on OS X (the code doesn't cause a problem but including dlfcn.h
// renders plugins unloadable)
QString lib = QString("%1/%2").arg(txtPluginDir->text()).arg(pluginDir[i]);

// void *handle = dlopen((const char *) lib, RTLD_LAZY);
void *handle = dlopen(lib.toLocal8Bit().data(), RTLD_LAZY | RTLD_GLOBAL);
if (!handle)

0 comments on commit a017ec0

Please sign in to comment.