Bug #1095

I have installed lua5.1.4 and luabind

Added by icecoldmoon almost 8 years ago. Updated almost 8 years ago.

Status:Rejected Start date:09/20/2010
Priority:Normal Due date:
Assignee:- % Done:

0%

Category:-
Target version:-

Description

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?

plase help....

History

#1 Updated by kervala almost 8 years ago

That's not a bug, you're simply using a not tested project generation from CMake. Please use the forum or contact the community

You should follow this tutorial to create Makefiles under Mac OS X.

Your error comes because you didn't link to lua.

#2 Updated by kervala almost 8 years ago

  • Status changed from New to Rejected

Also available in: Atom PDF