- Timestamp:
- Feb 20, 2006, 2:29:02 PM (19 years ago)
- Location:
- branches/shared_lib/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/shared_lib/src/orxonox.cc
r7170 r7171 341 341 // return false; 342 342 // } 343 DynamicLoader::loadDyLib(" libORXground_turret.so");343 DynamicLoader::loadDyLib("src/world_entities/.libs/libORXground_turret.so"); 344 344 345 345 // start the collision detection engine -
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; -
branches/shared_lib/src/util/loading/dynamic_loader.h
r7169 r7171 8 8 9 9 #include "factory.h" 10 #include <ltdl.h> 10 11 11 12 #include <string> … … 28 29 29 30 private: 30 void*handle;31 lt_dlhandle handle; 31 32 }; 32 33 -
branches/shared_lib/src/world_entities/Makefile.am
r7170 r7171 4 4 5 5 noinst_LIBRARIES = libORXwe.a 6 pkglib_LTLIBRARIES = libORXground_turret.la6 lib_LTLIBRARIES = libORXground_turret.la 7 7 libORXground_turret_la_SOURCES = npcs/ground_turret.cc 8 8
Note: See TracChangeset
for help on using the changeset viewer.