I’d like to compile Lua 5.2 alpha under visual studio but I’m getting errors and I have no clue how to fix them.
error LNK1169: one or more multiply defined symbols found
error LNK2005: _main already defined in lua.obj
I’d be grateful if anyone could guide me through the creation of a VS2010 solution for Lua 5.2 alpha, or point me to related resources.
Thanks in advance.
You are most probably compiling both
luac.candlua.cin one VS project. To build Lua yourself in VS you need three projects:library – this should be either DLL or static library project. Should include every .c file under src/ except
luac.candlua.c. You only need this if you are embedding.compiler – console executable, containing
luac.cinterpreter – console executable, containing
lua.c