[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Running Lua from within a Window Program
- From: Shmuel Zeigerman <shmuz@...>
- Date: Tue, 20 Sep 2016 10:55:15 +0300
On 20/09/2016 10:19, Thijs Schreijer wrote:
On 20 Sep 2016, at 08:11, steve donovan <email@example.com> wrote:
On Tue, Sep 20, 2016 at 4:39 AM, Erik Hougaard <firstname.lastname@example.org> wrote:
The only trouble you can get into, is if your DLL is 32bit and the Windows
Program is 64bit, then you need a Lua53.dll compiled for 64bit (a 64bit
process cannot load a 32bit DLL).
The other thing that's important: the DLL must also be compiled with
mingw so that both the program and the DLL are using the same runtime.
This ^^^ actually is the most important caveat. 64 vs 32 bit you will notice immediately, yet having the wrong runtime, will give you hard to trace sporadic failures.
As Lua APIs do not use run-time-specific types (such as FILE*), and
neither require malloc/free to be called from different sides of an app,
why different runtimes should be an issue?
I use mingw-built lua51.dll with Borland C++ Builder 5.0 applications
for years without problems.
Please give an example where one could have a problem.