diff --git a/base/plugins.cpp b/base/plugins.cpp index 6b70b77393d..a8fb07d8933 100644 --- a/base/plugins.cpp +++ b/base/plugins.cpp @@ -155,6 +155,13 @@ public: void *DynamicPlugin::findSymbol(const char *symbol) { #ifdef UNIX +#ifdef MACOSX + // Need to prepend underscore on Mac OS X + char buffer[256]; + buffer[0] = '_'; + strcpy(buffer + 1, symbol); + symbol = buffer; +#endif void *func = dlsym(_dlHandle, symbol); if (!func) warning("Failed loading symbold '%s' from plugin '%s' (%s)", symbol, _filename.c_str(), dlerror());