Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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 a017ec0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/gui/qgspluginmanager.cpp
Expand Up @@ -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
Expand All @@ -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)
Expand Down

0 comments on commit a017ec0

Please sign in to comment.