Re: Lua and Xcode for the clueless
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: Lua and Xcode for the clueless
- From: Peter Odding <xolox@...>
- Date: 2008年7月17日 05:59:55 +0200
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:
http://mcalley.net.au/luaErrors/Direct_code_import_error.png
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