Code:
"O:\CWorkspace\lake\build.bat" (in directory: O:\CWorkspace\lake)
...
Compiling Lake Objects
...
O:\CWorkspace\lake>gcc -Wall -Werror -m64 -mconsole -mwindows -mwin32 -o ".\obj64\lake.c.o" -c ".\lake.c"
...
Compiling Lua Objects
... Directory checks, for (*.c) loop on lua source directory and filter of lua.c/luac.c since they define main()
O:\CWorkspace\lake>gcc -Wall -Werror -m64 -mconsole -mwindows -mwin32 -o ".\obj64\lua\lbitlib.c.o" -c "O:\Common\lua-5.3.5\src\lbitlib.c"
...
Compiling Lake Executable
O:\CWorkspace\lake>call :chk_dir "O:\Common\lake\lake64"
O:\CWorkspace\lake>if exist "O:\Common\lake\lake64" goto :eof
O:\CWorkspace\lake>gcc -Wall -Werror -m64 -mconsole -mwindows -mwin32 -o "O:\Common\lake\lake64\lake64.exe" ".\obj64\Lakefile.c.o" ".\obj64\LAKEDIR.C.o" ".\obj64\lake.c.o" ".\obj64\luat.c.o" ".\obj64\LakeScript.c.o" ".\obj64\lua\lbitlib.c.o" ".\obj64\lua\lauxlib.c.o" ".\obj64\lua\lcode.c.o" ".\obj64\lua\lapi.c.o" ".\obj64\lua\ldblib.c.o" ".\obj64\lua\liolib.c.o" ".\obj64\lua\llex.c.o" ".\obj64\lua\lparser.c.o" ".\obj64\lua\lobject.c.o" ".\obj64\lua\ldebug.c.o" ".\obj64\lua\ldo.c.o" ".\obj64\lua\lcorolib.c.o" ".\obj64\lua\lgc.c.o" ".\obj64\lua\lstate.c.o" ".\obj64\lua\lundump.c.o" ".\obj64\lua\lmathlib.c.o" ".\obj64\lua\ltablib.c.o" ".\obj64\lua\ltm.c.o" ".\obj64\lua\lfunc.c.o" ".\obj64\lua\lstrlib.c.o" ".\obj64\lua\lopcodes.c.o" ".\obj64\lua\lutf8lib.c.o" ".\obj64\lua\loslib.c.o" ".\obj64\lua\lvm.c.o" ".\obj64\lua\loadlib.c.o" ".\obj64\lua\lmem.c.o" ".\obj64\lua\ltable.c.o" ".\obj64\lua\ldump.c.o" ".\obj64\lua\lzio.c.o" ".\obj64\lua\lctype.c.o" ".\obj64\lua\lstring.c.o" ".\obj64\lua\linit.c.o" ".\obj64\lua\lbaselib.c.o"
o:/common/mingw/bin/../lib/gcc/x86_64-w64-mingw32/8.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: .\obj64\LAKEDIR.C.o:LAKEDIR.C:(.text+0x20): undefined reference to `lua_createtable(lua_State*, int, int)'
o:/common/mingw/bin/../lib/gcc/x86_64-w64-mingw32/8.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: .\obj64\LAKEDIR.C.o:LAKEDIR.C:(.text+0x3f): undefined reference to `luat_setintegerfield(lua_State*, char const*, long long)'
o:/common/mingw/bin/../lib/gcc/x86_64-w64-mingw32/8.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: .\obj64\LAKEDIR.C.o:LAKEDIR.C:(.text+0x5e): undefined reference to `luat_setstringfield(lua_State*, char const*, char const*)'
o:/common/mingw/bin/../lib/gcc/x86_64-w64-mingw32/8.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: .\obj64\LAKEDIR.C.o:LAKEDIR.C:(.text+0x8a): undefined reference to `luaL_checkudata(lua_State*, int, char const*)'
o:/common/mingw/bin/../lib/gcc/x86_64-w64-mingw32/8.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: .\obj64\LAKEDIR.C.o:LAKEDIR.C:(.text+0xaa): undefined reference to `lua_pushnil(lua_State*)'
o:/common/mingw/bin/../lib/gcc/x86_64-w64-mingw32/8.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: .\obj64\LAKEDIR.C.o:LAKEDIR.C:(.text+0x104): undefined reference to `lua_pushnil(lua_State*)'
o:/common/mingw/bin/../lib/gcc/x86_64-w64-mingw32/8.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: .\obj64\LAKEDIR.C.o:LAKEDIR.C:(.text+0x130): undefined reference to `luaL_checkudata(lua_State*, int, char const*)'
o:/common/mingw/bin/../lib/gcc/x86_64-w64-mingw32/8.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: .\obj64\LAKEDIR.C.o:LAKEDIR.C:(.text+0x1f6): undefined reference to `luaL_checkudata(lua_State*, int, char const*)'
o:/common/mingw/bin/../lib/gcc/x86_64-w64-mingw32/8.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: .\obj64\LAKEDIR.C.o:LAKEDIR.C:(.text+0x211): undefined reference to `lua_pushstring(lua_State*, char const*)'
o:/common/mingw/bin/../lib/gcc/x86_64-w64-mingw32/8.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: .\obj64\LAKEDIR.C.o:LAKEDIR.C:(.text+0x260): undefined reference to `lua_pushfstring(lua_State*, char const*, ...)'
o:/common/mingw/bin/../lib/gcc/x86_64-w64-mingw32/8.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: .\obj64\LAKEDIR.C.o:LAKEDIR.C:(.text+0x279): undefined reference to `lua_pushfstring(lua_State*, char const*, ...)'
o:/common/mingw/bin/../lib/gcc/x86_64-w64-mingw32/8.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: .\obj64\LAKEDIR.C.o:LAKEDIR.C:(.text+0x2a5): undefined reference to `luaL_checkudata(lua_State*, int, char const*)'
o:/common/mingw/bin/../lib/gcc/x86_64-w64-mingw32/8.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: .\obj64\LAKEDIR.C.o:LAKEDIR.C:(.text+0x2b7): undefined reference to `lua_type(lua_State*, int)'
o:/common/mingw/bin/../lib/gcc/x86_64-w64-mingw32/8.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: .\obj64\LAKEDIR.C.o:LAKEDIR.C:(.text+0x2e5): undefined reference to `lua_pushnil(lua_State*)'
o:/common/mingw/bin/../lib/gcc/x86_64-w64-mingw32/8.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: .\obj64\LAKEDIR.C.o:LAKEDIR.C:(.text+0x30d): undefined reference to `lua_tolstring(lua_State*, int, unsigned long long*)'
o:/common/mingw/bin/../lib/gcc/x86_64-w64-mingw32/8.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: .\obj64\LAKEDIR.C.o:LAKEDIR.C:(.text+0x37d): undefined reference to `lua_pushcclosure(lua_State*, int (*)(lua_State*), int)'
o:/common/mingw/bin/../lib/gcc/x86_64-w64-mingw32/8.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: .\obj64\LAKEDIR.C.o:LAKEDIR.C:(.text+0x3cd): undefined reference to `lua_pushstring(lua_State*, char const*)'
o:/common/mingw/bin/../lib/gcc/x86_64-w64-mingw32/8.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: .\obj64\LAKEDIR.C.o:LAKEDIR.C:(.text+0x3eb): undefined reference to `lua_pushnil(lua_State*)'
o:/common/mingw/bin/../lib/gcc/x86_64-w64-mingw32/8.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: .\obj64\LAKEDIR.C.o:LAKEDIR.C:(.text+0x407): undefined reference to `lua_tonumberx(lua_State*, int, int*)'
o:/common/mingw/bin/../lib/gcc/x86_64-w64-mingw32/8.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: .\obj64\LAKEDIR.C.o:LAKEDIR.C:(.text+0x43a): undefined reference to `lua_pushnil(lua_State*)'
o:/common/mingw/bin/../lib/gcc/x86_64-w64-mingw32/8.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: .\obj64\LAKEDIR.C.o:LAKEDIR.C:(.text+0x443): undefined reference to `lua_error(lua_State*)'
o:/common/mingw/bin/../lib/gcc/x86_64-w64-mingw32/8.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: .\obj64\LAKEDIR.C.o:LAKEDIR.C:(.text+0x477): undefined reference to `luaL_checklstring(lua_State*, int, unsigned long long*)'
o:/common/mingw/bin/../lib/gcc/x86_64-w64-mingw32/8.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: .\obj64\LAKEDIR.C.o:LAKEDIR.C:(.text+0x489): undefined reference to `lua_settop(lua_State*, int)'
o:/common/mingw/bin/../lib/gcc/x86_64-w64-mingw32/8.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: .\obj64\LAKEDIR.C.o:LAKEDIR.C:(.text+0x497): undefined reference to `lua_newuserdata(lua_State*, unsigned long long)'
o:/common/mingw/bin/../lib/gcc/x86_64-w64-mingw32/8.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: .\obj64\LAKEDIR.C.o:LAKEDIR.C:(.text+0x4ab): undefined reference to `lua_pushnil(lua_State*)'
o:/common/mingw/bin/../lib/gcc/x86_64-w64-mingw32/8.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: .\obj64\LAKEDIR.C.o:LAKEDIR.C:(.text+0x4e1): undefined reference to `lua_getfield(lua_State*, int, char const*)'
o:/common/mingw/bin/../lib/gcc/x86_64-w64-mingw32/8.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: .\obj64\LAKEDIR.C.o:LAKEDIR.C:(.text+0x4ef): undefined reference to `lua_setmetatable(lua_State*, int)'
o:/common/mingw/bin/../lib/gcc/x86_64-w64-mingw32/8.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: .\obj64\LAKEDIR.C.o:LAKEDIR.C:(.text+0x526): undefined reference to `lua_settop(lua_State*, int)'
o:/common/mingw/bin/../lib/gcc/x86_64-w64-mingw32/8.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: .\obj64\LAKEDIR.C.o:LAKEDIR.C:(.text+0x52f): undefined reference to `lua_pushnil(lua_State*)'
o:/common/mingw/bin/../lib/gcc/x86_64-w64-mingw32/8.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: .\obj64\LAKEDIR.C.o:LAKEDIR.C:(.text+0x571): undefined reference to `lua_pushnil(lua_State*)'
o:/common/mingw/bin/../lib/gcc/x86_64-w64-mingw32/8.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: .\obj64\LAKEDIR.C.o:LAKEDIR.C:(.text+0x5a6): undefined reference to `LakeRegisterClass(lua_State*, char const*, luaL_Reg const*)'
o:/common/mingw/bin/../lib/gcc/x86_64-w64-mingw32/8.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: .\obj64\LAKEDIR.C.o:LAKEDIR.C:(.text+0x5ca): undefined reference to `lua_pushcclosure(lua_State*, int (*)(lua_State*), int)'
o:/common/mingw/bin/../lib/gcc/x86_64-w64-mingw32/8.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: .\obj64\LAKEDIR.C.o:LAKEDIR.C:(.text+0x5da): undefined reference to `lua_setglobal(lua_State*, char const*)'
...
PATH=O:\Common\MinGW\bin;C:\WINDOWS\SysWOW64
CPATH=O:\Common\MinGW\include;O:\Common\MinGW\include\freetype;O:\Common\lua-5.3.5\src
LIBRARY_PATH=O:\Common\MinGW\lib;C:\WINDOWS\SysWOW64
Compilation failed.
As you can see a weird set of errors appeared and I can't find any relevant information, google just keeps bringing up declaration issues (people confusing the term definition for declaration)