lua-users home
lua-l archive

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


> Zulfiqar Malik wrote:
> > I am linking lua statically.

Well, not quite, you also have Lua in a DLL i.e. your hook function.
No matter how you compile this on VC (with Lua as static library)
you will be in trouble. With VC the DLL resolves its entry points at
link time.
The only way that you can use DLLs that have Lua calls in your
app is to have Lua compiled as a DLL with /MD, compile your
executable with /MD and your DLL with /MD.

I know of no way around this using the VC runtime library.
The Lua 5.1 option of specifying your own allocation function (lua_Alloc)
probably wont help that much. RTL initialization is the usual killer.

DB