lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


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?
LDFLAGS=/implib:libtest.lib /out:libtest.dll /verbose /subsystem:console /debug
link /DLL $(LDFLAGS) lua5.4.2-static.lib *.obj

Ranier Vilela