lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]



On 25 Oct, 2012, at 19:08 , oliver <oliver.schoenborn@gmail.com> wrote:

On Wed, Oct 24, 2012 at 9:34 AM, Peter Drahoš <drahosp@gmail.com> wrote:
Announcing new binaries of the LuaDist batteries project.

The batteries sub-project aims to reproduce the LuaForWindows[1] distribution using LuaDist[2]. With LuaDist we can reproduce the same functionality on multiple platforms and compilers. The Windows release is currently built using MinGW32 and requires no additional runtime dependencies to be installed. Combined with the portable nature of the distribution (no install required, just unpack) this makes the project suitable for distribution of Lua-based applications.

Binaries for Windows, Ubuntu and OSX are now available for download[3].


Presumably the lua DLL produced in mingw32 was built with gcc? Can it then be linked by an application built using Visual Studio? I thought the answer would be no but I've never really looked into this...
Oliver
Yes,
use the /lib/liblua.dll.a import library as you would use .lib libraries in your VS project. Ensure /bin/liblua.dll is reachable once your application starts, copy it to PATH or alongside your product executable. Note I have not tested this in a long time so things might have changed. Generally I would not recommend mixing compilers.

Instead you can use CMake[1] to generate a Visual Studio project directly from our lua sources[2] and build it with your toolchain. Once cmake is installed use CMakeGUI and point it to the source. Select your desired project type eg. "Visual Studio XX" and hit Generate. This will generate a project you can open in your IDE of choice. If you use nmake you can even automate the process, see the entry on our wiki[3].

pd

[1] http://www.cmake.org
[2] https://github.com/LuaDist/lua
[3] https://github.com/LuaDist/Repository/wiki/LuaDist%3A-Manual-Installation