I am trying to statically link Lua to Nim app with dyn override. Does it actually work?
C:\severak\lunarender3\src>nim c --dynlibOverride:lua --passL:liblua.lib integra
tion.nim
Hint: used config file 'C:\bin\nim-1.6.6\config\nim.cfg' [Conf]
Hint: used config file 'C:\bin\nim-1.6.6\config\config.nims' [Conf]
Hint: used config file 'C:\severak\lunarender3\config.nims' [Conf]
..........................................................
Hint: [Link]
Hint: gc: refc; opt: none (DEBUG BUILD, `-d:release` generates faster code)
36935 lines; 0.424s; 39.418MiB peakmem; proj: C:\severak\lunarender3\src\integra
tion.nim; out: C:\severak\lunarender3\src\integration.exe [SuccessX]
C:\severak\lunarender3\src>integration
could not load: lua51.dll
I am not sure if I messed up something or why does it not work...
Is your liblua.lib a static library? On windows, both import library and static library have *.lib extension. If it is not static library, you need to find it or build from source code.
This article might help you understand about static library: https://internet-of-tomohiro.netlify.app/nim/clibrary.en.html