help me I have installed lua5.1.4 and luabind,

Added by icecoldmoon almost 8 years ago

I have installed lua5.1.4 and luabind,
After compile luabind, it generate a ".dylib" file, and a "luabind.a" after compile lua5.1.4.
I don't know how to include ".h" file and the lib file in my project using xcode.
this is what i have done,but it seems not work properly.

in project-->Edit project Settings-->build:
Header search paths: include the .h file.
Library Search paths: include the lib file.

in my program:
#include <lua.hpp>

lua.hpp:
extern "c"{
#include "lua.h"
#include"lualib.h"
#include"lauxlib.h"
}

#include <luabind/luabind.hpp>

it seems Compile and link work well,
but if I add:
"
lua_State *L;

void main() {
...
luaopen_io(L);
luabind::open(L);
...
}
"
then there has some link errors:

Undefined symbols:
"luaopen_io(lua_State*)", referenced from:
luaClass::abcc(lua_State*) in LuaClass.o
ld: symbol(s) not found
collect2: ld returned 1 exit status

Undefined symbols:
"luabind::open(lua_State*)", referenced from:
luaClass::abcc(lua_State*) in LuaClass.o
ld: symbol(s) not found
collect2: ld returned 1 exit status

it seems the lib files have not been add into my project, in VC project, I can use #pragma comment(lib,"xxx.lib") to add lib files into my project, and does anyone can tell me how it implement in MAC project?

I followed the tutorial and already generated liblua.a file and luabind.dylib,but i can't link my project these files using XCODE. I really want to know the exact config of XCODE

help me....please..


Replies (1)

RE: help me I have installed lua5.1.4 and luabind, - Added by vl almost 8 years ago

Currently, we compile the mac version of ryzom using the command line and CMake. I don't know XCode so I cannot tell more about your problem :/

(1-1/1)