Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7169 in orxonox.OLD for branches


Ignore:
Timestamp:
Feb 19, 2006, 6:35:31 PM (19 years ago)
Author:
bensch
Message:

shared_lib: some functionality

Location:
branches/shared_lib
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • branches/shared_lib/config.h.in

    r6838 r7169  
    1818/* if we have CURL */
    1919#undef HAVE_CURL
     20
     21/* Define to 1 if you have the <dlfcn.h> header file. */
     22#undef HAVE_DLFCN_H
    2023
    2124/* Define to 1 if you have the <ffmpeg/avcodec.h> header file. */
  • branches/shared_lib/configure.ac

    r7151 r7169  
    4242#########################
    4343AC_PROG_CXX
    44 AC_PROG_RANLIB
     44AC_PROG_LIBTOOL
    4545AC_HEADER_STDC
    4646
  • branches/shared_lib/src/Makefile.am

    r7151 r7169  
    1313
    1414orxonox_CPPFLAGS = -DIS_ORXONOX
    15 orxonox_LDFLAGS = -u global_ModelParticles_Factory
     15orxonox_LDFLAGS =  -rdynamic -ldl
    1616
    1717orxonox_DEPENDENCIES = \
  • branches/shared_lib/src/defs/debug.h

    r7165 r7169  
    6868
    6969  // LOADING
    70   #define DEBUG_MODULE_LOAD                  2
     70  #define DEBUG_MODULE_LOADING               2
    7171  #define DEBUG_MODULE_IMPORTER              2
    7272
  • branches/shared_lib/src/orxonox.cc

    r7167 r7169  
    290290
    291291#include "dynamic_loader.h"
     292#include <dlfcn.h>
    292293
    293294/**
     
    332333  delete[] imageDir;
    333334
    334   DynamicLoader::loadDyLib("libtest.so");
     335//   void* handle;
     336//   handle = dlopen("./src/world_entities/.libs/libORXground_turret.so", RTLD_NOW);
     337//   if(handle == NULL)
     338//   {
     339//     PRINTF(1)("unable to load %s\n", dlerror());
     340//
     341//     return false;
     342//   }
     343  DynamicLoader::loadDyLib("./src/world_entities/.libs/libORXground_turret.so");
    335344
    336345  // start the collision detection engine
  • branches/shared_lib/src/subprojects/collision_detection/Makefile.am

    r7156 r7169  
    44LIB_PREFIX=$(MAINSRCDIR)/lib
    55include $(MAINSRCDIR)/lib/BuildLibs.am
    6 
    7 
    8 importer_LDFLAGS = \
    9                 $(MWINDOWS)
    106
    117bin_PROGRAMS = collision
     
    2420                $(GTK2_LIBS) $(GTHREAD_LIBS) $(CURL_LIBS)
    2521
    26 importer_SOURCES= \
    27                 ../framework.cc \
    28                 importer.cc \
    29                 $(MAINSRCDIR)/world_entities/space_ships/space_ship.cc \
    30                 $(MAINSRCDIR)/world_entities/weapons/test_gun.cc
    31 
    32 
    33 
    3422collision_CPPFLAGS =  \
    3523                -DGUI_MODULE   \
  • branches/shared_lib/src/util/loading/dynamic_loader.cc

    r7167 r7169  
    3030*/
    3131DynamicLoader::DynamicLoader (const std::string& libName)
    32     : Factory(NULL, CL_NULL)
    3332{
    3433  this->setClassID(CL_DYNAMIC_LOADER, "DynamicLoader");
     
    6261}
    6362
    64 bool DynamicLoader::loadDyLib(const std::string& libName)
     63bool DynamicLoader::loadDyLib(const char* libName)
    6564{
    6665  void* handle;
    67   handle = dlopen(&libName[0], RTLD_NOW);
     66  handle = dlopen(libName, RTLD_NOW);
    6867  if(handle == NULL)
    6968  {
    70     PRINTF(0)("unable to load %s\n", &libName[0]);
     69    PRINTF(1)("unable to load %s: %s\n", libName, dlerror());
     70
    7171    return false;
    7272  }
  • branches/shared_lib/src/util/loading/dynamic_loader.h

    r7167 r7169  
    1111#include <string>
    1212
    13 #define DYNAMIC_LINKAGE_FACTORY(CLASS_NAME, CLASS_ID) \
    14           void* DynamicCreator(const TiXmlElement* root) { return new CLASS_NAME(root); };
    15 
    1613// FORWARD DECLARATION
    1714
    1815//! A class for ...
    19 class DynamicLoader : public Factory
     16class DynamicLoader : public BaseObject
    2017{
    2118
     
    2724  virtual BaseObject* fabricateObject(const TiXmlElement* root = NULL) const;
    2825
    29   static bool loadDyLib(const std::string& libName);
     26  static bool loadDyLib(const char* libName);
    3027
    3128
  • branches/shared_lib/src/world_entities/Makefile.am

    r7155 r7169  
    44
    55noinst_LIBRARIES = libORXwe.a
     6#lib_LTLIBRARIES = libORXground_turret.la
     7#libORXground_turret_la_SOURCES = npcs/ground_turret.cc
    68
    79## THESE ARE THE BASE CLASSES OF ALL WORLD_ENTITIES
  • branches/shared_lib/src/world_entities/WorldEntities.am

    r7167 r7169  
    33                world_entities/npcs/npc_test1.cc \
    44                world_entities/npcs/npc_test.cc \
    5                 world_entities/npcs/ground_turret.cc \
    65                \
    76                world_entities/environment.cc \
Note: See TracChangeset for help on using the changeset viewer.