Changeset 7513
- Timestamp:
- Oct 9, 2010, 12:27:50 AM (14 years ago)
- Location:
- code/branches/ois_update/src/libraries/core
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/ois_update/src/libraries/core/DynLib.cc
r6417 r7513 42 42 #endif 43 43 44 #ifdef ORXONOX_PLATFORM_ LINUX44 #ifdef ORXONOX_PLATFORM_UNIX 45 45 # include <dlfcn.h> 46 46 #endif 47 47 48 48 #ifdef ORXONOX_PLATFORM_APPLE 49 # include <macPlugins.h>49 # include <OSX/macUtils.h> // OGRE include 50 50 #endif 51 51 … … 75 75 if (name.substr(name.length() - 3, 3) != ".so") 76 76 name += ".so"; 77 #elif OGRE_PLATFORM == OGRE_PLATFORM_APPLE 78 // dlopen() does not add .dylib to the filename, like windows does for .dll 79 if (name.substr(name.length() - 6, 6) != ".dylib") 80 name += ".dylib"; 81 #elif OGRE_PLATFORM == OGRE_PLATFORM_WIN32 82 // Although LoadLibraryEx will add .dll itself when you only specify the library name, 83 // if you include a relative path then it does not. So, add it to be sure. 84 if (name.substr(name.length() - 4, 4) != ".dll") 85 name += ".dll"; 77 86 #endif 78 87 … … 127 136 LocalFree( lpMsgBuf ); 128 137 return ret; 129 #elif defined(ORXONOX_PLATFORM_ LINUX)138 #elif defined(ORXONOX_PLATFORM_UNIX) 130 139 return std::string(dlerror()); 131 #elif defined(ORXONOX_PLATFORM_APPLE)132 return std::string(mac_errorBundle());133 140 #else 134 141 return ""; -
code/branches/ois_update/src/libraries/core/DynLib.h
r7512 r7513 59 59 60 60 #elif defined(ORXONOX_PLATFORM_APPLE) 61 # define DYNLIB_HANDLE CFBundleRef62 # define DYNLIB_LOAD( a ) Ogre::mac_load ExeBundle( a )63 # define DYNLIB_GETSYM( a, b ) Ogre::mac_getBundleSym( a, b )64 # define DYNLIB_UNLOAD( a ) Ogre::mac_unloadExeBundle( a )61 # define DYNLIB_HANDLE void* 62 # define DYNLIB_LOAD( a ) Ogre::mac_loadDylib( a ) 63 # define DYNLIB_GETSYM( a, b ) dlsym( a, b ) 64 # define DYNLIB_UNLOAD( a ) dlclose( a ) 65 65 #endif 66 66
Note: See TracChangeset
for help on using the changeset viewer.