What I did:
Download lua-5.4.3.tar.gz
Create 3 projects in Visual Studio
library (dll)
Add lapi.c lcode.c lctype.c ldebug.c ldo.c ldump.c lfunc.c lgc.c llex.c lmem.c lobject.c lopcodes.c lparser.c lstate.c lstring.c ltable.c ltm.c lundump.c lvm.c lzio.c lauxlib.c lbaselib.c lcorolib.c ldblib.c liolib.c lmathlib.c loadlib.c loslib.c lstrlib.c ltablib.c lutf8lib.c linit.c
Add LUA_BUILD_AS_DLL flag
interpreter (exe)
Add lua.c
Add library dependency
compiler (exe)
Add luac.c
Add library dependency
Build the solution
library and interpreter were built successfully, but I got 2 errors for the compiler project.
1>luac.obj : error LNK2019: unresolved external symbol _luaG_getfuncline referenced in function _PrintCode
1>luac.obj : error LNK2019: unresolved external symbol _luaU_dump referenced in function _pmain
How to fix them?