lua-users home
lua-l archive

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


BurP dahim wrote:
> ps: if i don't load any lua libs, it won't crash. If i load luaopen_base it 
> will crash (i can load any other lib without any problems).

Are you sure you are following the new 5.1 protocol for loading
libraries? You must _not_ call luaopen_* directly. See the code
in linit.c for the proper way to do it (or just call
luaL_openlibs() which opens all standard libraries).

> so : if my control.dll dynamically load a plugin.dll which is dynamically 
> linked to lua and use it. my app will crash.
> It looks like a memory problem, but i don't know what i could have done 
> wrong.

A common mistake is to link different parts of a project to
different runtime libraries (using different memory allocators).
Check that every EXE/DLL depends on the same MSVCRT DLL.