Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: zwanzika.hatzel on July 17, 2022, 11:55:09 pm

Title: Building and debugging the Lua interpreter
Post by: zwanzika.hatzel on July 17, 2022, 11:55:09 pm
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?
Title: Re: Building and debugging the Lua interpreter
Post by: stahta01 on July 18, 2022, 02:56:16 am
https://forums.codeblocks.org/index.php/topic,9996.0.html (https://forums.codeblocks.org/index.php/topic,9996.0.html)