Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 14, 2011, 3:53:38 AM (14 years ago)
Author:
rgrieder
Message:

Merged ois_update branch (before it was renamed to mac_osx) into kicklib branch.

Location:
code/branches/kicklib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/kicklib

  • code/branches/kicklib/src/libraries/core/DynLib.cc

    r6417 r8071  
    4242#endif
    4343
    44 #ifdef ORXONOX_PLATFORM_LINUX
     44#ifdef ORXONOX_PLATFORM_UNIX
    4545#  include <dlfcn.h>
    4646#endif
    4747
    4848#ifdef ORXONOX_PLATFORM_APPLE
    49 include <macPlugins.h>
     49 include <OSX/macUtils.h> // OGRE include
    5050#endif
    5151
     
    7575        if (name.substr(name.length() - 3, 3) != ".so")
    7676           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";
    7786#endif
    7887
     
    127136        LocalFree( lpMsgBuf );
    128137        return ret;
    129 #elif defined(ORXONOX_PLATFORM_LINUX)
     138#elif defined(ORXONOX_PLATFORM_UNIX)
    130139        return std::string(dlerror());
    131 #elif defined(ORXONOX_PLATFORM_APPLE)
    132         return std::string(mac_errorBundle());
    133140#else
    134141        return "";
    135142#endif
    136143    }
    137 
    138144}
Note: See TracChangeset for help on using the changeset viewer.