News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Building and debugging the Lua interpreter

Started by zwanzika.hatzel, July 17, 2022, 11:55:09 PM

Previous topic - Next topic

zwanzika.hatzel

Hi,

I would like to build the Lua interpreter with the aim of stepping thru its code and understand how it works.

I made a new project (console application), added all the c and h files and then built, but I get loads of errors such as the following:

||=== Build: Debug in test (compiler: GNU GCC Compiler) ===|
obj/Debug/lua-master/onelua.o||in function `lua_newstate':|
/home/user/Desktop/lua-master/lstate.c|355|multiple definition of `lua_newstate'; obj/Debug/lua-master/lstate.o:/home/user/Desktop/lua-master/lstate.c:355: first defined here|
/usr/bin/ld: obj/Debug/lua-master/onelua.o||in function `lua_setcstacklimit':|
/home/user/Desktop/lua-master/lstate.c|99|multiple definition of `lua_setcstacklimit'; obj/Debug/lua-master/lstate.o:/home/user/Desktop/lua-master/lstate.c:99: first defined here|
/usr/bin/ld: obj/Debug/lua-master/onelua.o||in function `lua_newthread':|
/home/user/Desktop/lua-master/lstate.c|286|multiple definition of `lua_newthread'; obj/Debug/lua-master/lstate.o:/home/user/Desktop/lua-master/lstate.c:286: first defined here|
/usr/bin/ld: obj/Debug/lua-master/onelua.o||in function `lua_resetthread':|
/home/user/Desktop/lua-master/lstate.c|346|multiple definition of `lua_resetthread'; obj/Debug/lua-master/lstate.o:/home/user/Desktop/lua-master/lstate.c:346: first defined here|
/usr/bin/ld: obj/Debug/lua-master/onelua.o||in function `lua_close':|
/home/user/Desktop/lua-master/lstate.c|411|multiple definition of `lua_close'; obj/Debug/lua-master/lstate.o:/home/user/Desktop/lua-master/lstate.c:411: first defined here|

Has anyone been successful at building and stepping thru the code of the lua interpreter?

stahta01

C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]