[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Lua and Xcode for the clueless
- From: "Vaughan McAlley" <ockegheim@...>
- Date: Thu, 17 Jul 2008 15:00:58 +1000
Aha, I tried including lua.hpp and it works. It _is_ easy if you know
what you're doing :-)
2008/7/17 Vaughan McAlley <firstname.lastname@example.org>:
> Thank you. I've left out lua.c and luac.c, and the multiple mains
> problem is gone. It still appears to import lualib.h and lauxlib.h but
> then says luaL_newstate() is an undefined symbol.
>>If you take a look at lua-5.1.3/src/Makefile you'll see that you need different
>>source code files for the Lua library vs. the interpreter vs. the compiler.
> Unfortunately for me, apart from PLAT= macosx, the Makefile may as
> well be in Sanscrit for all I can understand it :-(
> 2008/7/17 Peter Odding <email@example.com>:
>>> I've tried a couple of methods of importing Lua. Firstly I put all the
>>> source into a folder called LuaSource and imported it. When I try to
>>> compile it gives this error:
>> The error message says main() occurred multiple times while it shouldn't
>> have. This makes sense considering you've tried to compile 1) your program,
>> 2) the Lua interpreter and 3) the Lua bytecode compiler all at once (they
>> all have a main() function). If you take a look at lua-5.1.3/src/Makefile
>> you'll see that you need different source code files for the Lua library vs.
>> the interpreter vs. the compiler. So just pick the source code files needed
>> to compile the library and import those but leave the other files out (at
>> least lua.c and luac.c).
>> HTH and good luck,
>> Peter Odding