Changeset 7171 in orxonox.OLD for branches/shared_lib/src/util/loading/dynamic_loader.cc
- Timestamp:
- Feb 20, 2006, 2:29:02 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/shared_lib/src/util/loading/dynamic_loader.cc
r7169 r7171 17 17 18 18 #include "dynamic_loader.h" 19 20 21 #include <dlfcn.h>22 19 23 20 … … 47 44 // delete what has to be deleted here 48 45 if (this->handle != NULL) 49 dlclose(this->handle);46 lt_dlclose(this->handle); 50 47 } 51 48 … … 53 50 bool DynamicLoader::loadDynamicLib(const std::string& libName) 54 51 { 55 this->handle = dlopen(&libName[0], RTLD_NOW); 52 if (lt_dlinit () != 0) 53 { 54 PRINTF(1)("Initializing LT_DL_LIB\n"); 55 } 56 this->handle = lt_dlopen(&libName[0]); 56 57 if(this->handle == NULL) 57 58 { 58 59 return false; 59 60 } 60 void *mkr = dlsym( this->handle, "maker");61 //void *mkr = dlsym( this->handle, "maker"); 61 62 } 62 63 63 64 bool DynamicLoader::loadDyLib(const char* libName) 64 65 { 66 if (lt_dlinit () != 0) 67 { 68 PRINTF(1)("Initializing LT_DL_LIB\n"); 69 } 70 65 71 void* handle; 66 handle = dlopen(libName, RTLD_NOW);72 handle = lt_dlopen(libName); 67 73 if(handle == NULL) 68 74 { 69 PRINTF(1)("unable to load %s: %s\n", libName, dlerror());75 PRINTF(1)("unable to load %s: %s\n", libName, lt_dlerror()); 70 76 71 77 return false;
Note: See TracChangeset
for help on using the changeset viewer.