[Orxonox-commit 2872] r7575 - code/branches/ois_update/src/libraries/core
rgrieder at orxonox.net
rgrieder at orxonox.net
Thu Oct 21 23:16:40 CEST 2010
Author: rgrieder
Date: 2010-10-21 23:16:39 +0200 (Thu, 21 Oct 2010)
New Revision: 7575
Modified:
code/branches/ois_update/src/libraries/core/DynLib.cc
code/branches/ois_update/src/libraries/core/DynLib.h
Log:
Copied code for Ogre::mac_loadDylib to DynLib.h because the symbol doesn't get exported to the Ogre library.
Modified: code/branches/ois_update/src/libraries/core/DynLib.cc
===================================================================
--- code/branches/ois_update/src/libraries/core/DynLib.cc 2010-10-20 21:34:21 UTC (rev 7574)
+++ code/branches/ois_update/src/libraries/core/DynLib.cc 2010-10-21 21:16:39 UTC (rev 7575)
@@ -142,4 +142,14 @@
#endif
}
+#if defined(ORXONOX_PLATFORM_APPLE)
+ /*static*/ void* DynLib::mac_loadDylib(const char* name)
+ {
+ std::string fullPath=name;
+ if(name[0]!='/')
+ fullPath = macPluginPath()+"/"+fullPath;
+
+ return dlopen(fullPath.c_str(), RTLD_LAZY | RTLD_GLOBAL);
+ }
+#endif
}
Modified: code/branches/ois_update/src/libraries/core/DynLib.h
===================================================================
--- code/branches/ois_update/src/libraries/core/DynLib.h 2010-10-20 21:34:21 UTC (rev 7574)
+++ code/branches/ois_update/src/libraries/core/DynLib.h 2010-10-21 21:16:39 UTC (rev 7575)
@@ -59,7 +59,7 @@
#elif defined(ORXONOX_PLATFORM_APPLE)
# define DYNLIB_HANDLE void*
-# define DYNLIB_LOAD( a ) Ogre::mac_loadDylib( a )
+# define DYNLIB_LOAD( a ) DynLib::mac_loadDylib( a )
# define DYNLIB_GETSYM( a, b ) dlsym( a, b )
# define DYNLIB_UNLOAD( a ) dlclose( a )
#endif
@@ -116,6 +116,11 @@
protected:
+#elif defined(ORXONOX_PLATFORM_APPLE)
+ // From macUtils.h in OGRE
+ static void* mac_loadDylib(const char* name);
+#endif
+
/// Handle to the loaded library.
DYNLIB_HANDLE m_hInst;
};
More information about the Orxonox-commit
mailing list