[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Lua for Windows Platforms
- From: "Michael T. Richter" <mtr@...>
- Date: Wed, 7 Oct 1998 08:48:49 +0000
>>As a precis, I add the following to lua.h for the basic library:
>>#define EXPORT __declspec(dllexport)
> A few weeks ago, I downloaded Lua 3.1. Built a dll project using MSVC++
> 4.2 dll wizard, and included all the *.c files in the offical release,
> defined EXPORT as exactly what you did. No changes on any *.c file.
> Everything just works fine. Lua is great.
One caveat: when using the DLLs and headers there is a slight modification
needed to the above otherwise some things just don't quite work.
(Specifically, some exported variables don't work out.)
The modifications are:
#define EXPORT __declspec(dllexport) /* building DLL, exported */
#define EXPORT __declspec(dllimport) /* using DLL, imported */
If you don't do this, some things won't compile if you include debug
support. If you do this, you need to #define DLL (either in source or on
the command line) when building the DLL(s) and make sure it is undefined
when using the DLLs.
Michael T. Richter <firstname.lastname@example.org> http://www.igs.net/~mtr/
PGP Key: http://www.igs.net/~mtr/pgp-key.html
PGP Fingerprint: 40D1 33E0 F70B 6BB5 8353 4669 B4CC DD09 04ED 4FE8