[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: DLLs with MinGW
- From: Ignacio Castaño <castanyo@...>
- Date: Sun, 22 Jun 2003 04:26:03 +0200
marcus.cf wrote:
> I didn't know MSYS, and Cygwin was too big. Thanks for
> the tip.
> Anyway, the standard makefiles don't have a target "dll"
> (it's not much different from "so", but it's not the
> same)
To build the dlls you will need a rule like this:
dll:
DLLWRAP --output-def lib/liblua.def --implib lib/liblua.dll.a src/*.o
$(DLLWRAP_OPTS) -o bin/lua-$V.dll
DLLWRAP --output-def lib/liblualib.def --implib lib/liblualib.dll.a
src/lib/*.o $(DLLWRAP_OPTS) -L$(LIB) -llua.dll -o bin/lualib-$V.dll
where DLLWRAP and DLLWRAP_OPTS are:
DLLWRAP=dllwrap.exe
DLLWRAP_OPTS= --no-export-all-symbols --add-stdcall-alias
you also have define LUA_API as '__declspec(dllexport)'
The loadmodule library does that, and also add support for loadable binary
modules:
http://lua-users.org/wiki/LuaBinaryModules
http://talika.eii.us.es/~titan/lua/lua-5.0-loadmodule-2002-12-18.patch
Hope that helps,
Ignacio Castaño
castanyo@yahoo.es