[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Module DLL with Lua 5.4.2
- From: Sergey Kovalev <kovserg33@...>
- Date: Tue, 27 Oct 2020 15:06:08 +0300
Why did you use lua5.4.2-static.lib for dll ?
вт, 27 окт. 2020 г. в 14:22, Ranier Vilela <ranier.vf@gmail.com>:
>
> 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