> -----Original Message----- > From: steve donovan [mailto:steve.j.dono...@gmail.com] > Sent: vrijdag 5 april 2013 7:55 > To: luarocks-developers@lists.sourceforge.net > Subject: Re: [Luarocks-developers] MinGW and LuaSocket > > On Thu, Apr 4, 2013 at 10:45 PM, Thijs Schreijer <th...@thijsschreijer.nl> > wrote: > > What I did so far was renaming the "liblua.a" generated and > > installed by the Lua makefile to "lua51.lib" and then LuaRocks > > links against that (without errors so far). Am I supposed to > > link against the DLL? > > I think that might 'appear to work', until you do non-trivial things. > liblua.a is the static library, so your extensions get linked statically > against Lua - so you end up with big DLLs that all have Lua cores. I don't > think they will play nice with each other. Standard practice with MinGW > is to link directly against the DLL. (It can link against a .lib or a .a > but that needs to be an import library for the DLL.) > How I got things to work with the Lua that comes with the LuaDist > batteries: > > variables = { > MSVCRT = 'm', -- stop us linking against msvc80 > LUALIB = 'liblua.dll.a', > }
I know little about this compiler and linking stuff I'm afraid. So compiling Lua from source gives me 2 executables and "lua51.dll" and "liblua.a". So if the "liblua.a" is for static linking as you mentioned, I would need to link against the "lua51.dll" then. Correct? (a small test against luafilesystem fixed the problem I had with that one, so it seems to be the right way) Then the LuaRocks installer would have to be changed. It now looks explicitly for "lua5.1.lib" in the \bin\ and \lib\ directories. So it would have to look for multiple files; "lua5.1.lib liblua.dll lua51.dll" (any others?) and then depending on what is found, should write the variable section into the "config.lua" file. > The first line would no longer be necessary with your fix, (although note > that the msvcr80 case must then be explicit in the config file!) When compiling with MinGW this is the correct default imo. If you compile against msvcr80, you would probably use the Microsoft compiler anyway. > The second line is the _import_ library for liblua.dll (no one agrees on > what Lua DLLs should be called ;)) > > > @Steve > > Can you give it a try? > > Cool, I'll give it a spin. > > steve d. ------------------------------------------------------------------------------ Minimize network downtime and maximize team effectiveness. Reduce network management and security costs.Learn how to hire the most talented Cisco Certified professionals. Visit the Employer Resources Portal http://www.cisco.com/web/learning/employer_resources/index.html _______________________________________________ Luarocks-developers mailing list Luarocks-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/luarocks-developers