Hi,
I'm trying to create a module in DLL, with msvc 2019 (64 bits).
When I call the C function inside Lua, it is giving the following error:
lua: atests.lua: 6: attempt to call a nil value (global 'atest1')
stack traceback:
atests.lua: 6: in main chunk
[C]: in?
Do I need something more to create the DLL to work with Lua?
DEFINES=/D "_WIN32" /D "DEBUG" /D "_CONSOLE" /D "_MBCS" /D "_CRT_SECURE_NO_WARNINGS" /D "LUA_BUILD_AS_DLL"
LDFLAGS=/implib:libtest.lib /out:libtest.dll /verbose /subsystem:console /debug
link /DLL $(LDFLAGS) lua5.4.2-static.lib *.obj
regards,
Ranier Vilela