[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Compiling LPeg on Windows as C++
- From: Matthias Kluwe <mkluwe@...>
- Date: Sat, 13 Feb 2010 19:50:23 +0100
Hi!
2009/12/30 Peter Cawley <lua@corsix.org>:
> You should not link Lua statically if you're loading extension
> modules, but you should be able to link the MSVC runtime statically,
> as long as memory, files, etc. allocated in one DLL are deallocated in
> the same DLL.
Well, finally I've invested some "spare" time and I'm able to resolve
the issue now:
My Lua build incorporated all of Lua into the lua.exe executable. When
I switched to building the a Lua DLL and linking lua.exe against it,
everything worked fine.
At last it was you mentioning "[...] allocated in one DLL are
deallocated in the same DLL" put me to try the build procedure
mentioned in Chapter 1 of the book Beginning Lua Programming. I found
this hint http://www.lua.org/faq.html#1.1.
I've scarcely come in touch with building DLLs (or software on
Windows) and I think this build instructions should find a prominent
place at least in http://lua-users.org/wiki/BuildingLua, saving an
inexperienced user like me lots of time (and head scratching). If
nobody better fitted for that task takes a try at that, I'll do ...
Regards,
Matthias