lua-users home
lua-l archive

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


On Thu, Aug 19, 2010 at 10:45 PM, Martin <wtxnh-lua@yahoo.com.au> wrote:
>> And are the alien.dlls and lua51.exe linked against lua51.dll?
>
> Yes they are. For example core.dll is compiled like this:
>
> ${CC} -shared -s $(CFLAGS) -L../installed -llua51 -o src/alien/core.dll src/alien/core.c libffi/win32/libffi.a

Ah, but there is a common problem that can appear here.  The
cross-compile is against the old C runtime msvcrt.dll, whereas (for
instance) Lua for Windows is compiled against mscr80.dll.  So if you
were using that Windows lua51.dll, then you are guaranteed to have
weird intermittent problems.  So you need to build lua51.dll against
msvcrt (which is certainly the default for mingw, probably for the
cross-compile) and use that.

steve d.

PS. Windows programming has been made unnecessarily weird by MS, IMHO.