Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 29, 2008, 5:20:08 PM (17 years ago)
Author:
bknecht
Message:

lua linking works now (v 5.1 and 5.0). not tested on tardis and will not work on windows

Location:
code/branches/script/src/orxonox/script
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/script/src/orxonox/script/Script.cc

    r946 r954  
    2727
    2828#include "Script.h"
    29 //#include <lua.h>
    30 #include <lualib.h>
    31 #include <lauxlib.h>
     29extern "C" {
     30#include "lualib.h"
     31#include "lauxlib.h"
     32}
    3233
    3334
     
    3738  {
    3839    state_ = lua_open();
    39 
     40#if Lua_VERSION == 51
    4041    luaL_openlibs(state_);
     42#else
     43    luaopen_base(state_);
     44    luaopen_table(state_);
     45    luaopen_io(state_);
     46    luaopen_string(state_);
     47    luaopen_math(state_);
     48    luaopen_debug(state_);
     49#endif
    4150  }
    4251
  • code/branches/script/src/orxonox/script/Script.h

    r946 r954  
    88#define _Script_H__
    99
    10 #include <lua.h>
     10extern "C" {
     11#include "lua.h"
     12}
    1113
    1214namespace orxonox
Note: See TracChangeset for help on using the changeset viewer.