Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7171 in orxonox.OLD for branches/shared_lib/src


Ignore:
Timestamp:
Feb 20, 2006, 2:29:02 PM (19 years ago)
Author:
bensch
Message:

dylib: more like in the real world… should work on win too

Location:
branches/shared_lib/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/shared_lib/src/orxonox.cc

    r7170 r7171  
    341341//     return false;
    342342//   }
    343   DynamicLoader::loadDyLib("libORXground_turret.so");
     343  DynamicLoader::loadDyLib("src/world_entities/.libs/libORXground_turret.so");
    344344
    345345  // start the collision detection engine
  • branches/shared_lib/src/util/loading/dynamic_loader.cc

    r7169 r7171  
    1717
    1818#include "dynamic_loader.h"
    19 
    20 
    21 #include <dlfcn.h>
    2219
    2320
     
    4744  // delete what has to be deleted here
    4845  if (this->handle != NULL)
    49     dlclose(this->handle);
     46    lt_dlclose(this->handle);
    5047}
    5148
     
    5350bool DynamicLoader::loadDynamicLib(const std::string& libName)
    5451{
    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]);
    5657  if(this->handle == NULL)
    5758  {
    5859    return false;
    5960  }
    60   void *mkr = dlsym( this->handle, "maker");
     61  //void *mkr = dlsym( this->handle, "maker");
    6162}
    6263
    6364bool DynamicLoader::loadDyLib(const char* libName)
    6465{
     66  if (lt_dlinit () != 0)
     67  {
     68    PRINTF(1)("Initializing LT_DL_LIB\n");
     69  }
     70
    6571  void* handle;
    66   handle = dlopen(libName, RTLD_NOW);
     72  handle = lt_dlopen(libName);
    6773  if(handle == NULL)
    6874  {
    69     PRINTF(1)("unable to load %s: %s\n", libName, dlerror());
     75    PRINTF(1)("unable to load %s: %s\n", libName, lt_dlerror());
    7076
    7177    return false;
  • branches/shared_lib/src/util/loading/dynamic_loader.h

    r7169 r7171  
    88
    99#include "factory.h"
     10#include <ltdl.h>
    1011
    1112#include <string>
     
    2829
    2930private:
    30   void*      handle;
     31  lt_dlhandle      handle;
    3132};
    3233
  • branches/shared_lib/src/world_entities/Makefile.am

    r7170 r7171  
    44
    55noinst_LIBRARIES = libORXwe.a
    6 pkglib_LTLIBRARIES = libORXground_turret.la
     6lib_LTLIBRARIES = libORXground_turret.la
    77libORXground_turret_la_SOURCES = npcs/ground_turret.cc
    88
Note: See TracChangeset for help on using the changeset viewer.