Changeset 8071 for code/branches/kicklib/src/libraries/core/DynLib.cc
- Timestamp:
- Mar 14, 2011, 3:53:38 AM (14 years ago)
- Location:
- code/branches/kicklib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/kicklib
-
code/branches/kicklib/src/libraries/core/DynLib.cc
r6417 r8071 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 ""; 135 142 #endif 136 143 } 137 138 144 }
Note: See TracChangeset
for help on using the changeset viewer.