On Wed, Mar 27, 2013 at 11:30 PM, Thijs Schreijer <th...@thijsschreijer.nl> wrote: > Still trying to figure out dll dependencies, currently I'm using the Lua > executable from LuaRocks and building libraries with MinGW. Is LuaRocks build > using the MS tool chain? Because in that case those executables are also > unsafe to use with libraries compiled with MinGW.
I got bitten with this recently; it does use -lmsvc80 by default. However, there is a way to make that dependency go away with the LuaRocks that comes with the LuaDist batteries (exact location of config.lua is given by just running 'luarocks') -- d:\kool\lua\etc\config.lua variables = { MSVCRT = 'm', -- stop us linking against msvc80 LIBFLAG = '-shared -Wl,-s ', -- strip by default LUALIB = 'liblua.dll.a', } You can ignore that LUALIB (LuaDist has its own naming peculiarities) but linking against libm.a seems to be harmless and doesn't make the DLLs any bigger. So with LuaFileSystem the built-in build looks like this: mingw32-gcc -O2 -Id:/kool/lua/bin/../include -c src/lfs.c -o src/lfs.o mingw32-gcc -shared -Wl,-s -o lfs.dll src/lfs.o d:/kool/lua/bin/../lib/liblua.dll.a -lm But note the name of 'gcc' - this doesn't work with mingw64. However, adding these variables restores sanity: CC = 'gcc', LD = 'gcc', To return to the topic, LuaSocket doesn't work, because it's a makefile rock, and then the default action messes us up: mingw32-make: Makefile.win: No such file or directory mingw32-make: *** No rule to make target `Makefile.win'. Stop. It's entirely possible to do a LuaSocket rockspec which _just_ uses the builtin build type. I'll post this if there's any interest. steve d. ------------------------------------------------------------------------------ Own the Future-Intel® Level Up Game Demo Contest 2013 Rise to greatness in Intel's independent game demo contest. Compete for recognition, cash, and the chance to get your game on Steam. $5K grand prize plus 10 genre and skill prizes. Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d _______________________________________________ Luarocks-developers mailing list Luarocks-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/luarocks-developers