Compiling Lua 5.2 alpha under VS2010

I would like to compile Lua 5.2 alpha for a visual studio, but I get errors and I don’t know how to fix them.

error LNK1169: one or more multiply defined symbols found
error LNK2005: _main already defined in lua.obj

I would be grateful if someone could help me in creating the VS2010 solution for Lua 5.2 alpha or point me to related resources.

Thanks in advance.

+3
source share
3 answers

Most likely, you compile both luac.c, and lua.cin the same project VS. To build Lua yourself in VS, you need three projects:

Library

- This must be a DLL or static library project. Must include every .c file in src / except luac.c and lua.c. You only need this if you embed.

- , luac.c

- , lua.c

+10

, lua.c luac.c, . - . Lua , Lua .

+1

Lua , main, . Lua main.

0

All Articles