[Top][All Lists]

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

[Libqtlua-list] QtLua Build VS2010 (now working)

From: Jeff Sprenger
Subject: [Libqtlua-list] QtLua Build VS2010 (now working)
Date: Thu, 25 Jul 2013 07:45:12 -0400
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130620 Thunderbird/17.0.7

I have made progress on the Windows build for QtLua,
and now have a working QtLua under Windows 7/64 built with Visual Studio 2010.

1. I downloaded the svn official repository version (rather that the git version elsewhere). Alexandre pointed out that I was using the unofficial source.

2. The current CMakelists.txt files seems to be set for QT5. Since I had to build for QT4 (4.8), I changed out things like QT5_USE_MODULES and QT5_CPP_WRAP. More on this later.

3. I cleared out the build directory and ran CMake to create the Visual Studio solution and project files. This works after telling CMake where the appropriate Lua5.1 libraries are, also built for Win x64.

4. A few modifications to the QtLua code, mostly to export the necessary functions to the dlls by inserting appropriate _declspec(dllexport) and _declspec(dllexport) into the qtlua classes. Other code modifications included changing out "foreach" loops, and array initializations using variables (ms compiler was not happy). Again, more details on this later.

5. I changed all project properties so that they could find the lua5.1 lib and header files.

6. I built the basic console example in VS2010 with some changes:

- added to MainWindow() so that the console can recognize the QtLua and QtLib commands. Otherwise things like print() and help() fail.


- preprocessor definition for qtlua project : added HAVE_QT_UITOOLS. For some reason, CMake fails to set this in the project file.

7. I built my own version of the console example using a fresh Qt Application in Visual Studio. This requires the Qt plugin for VS. But there is a slight change to the lua script I tested (perhaps the example provided is outdated).


I changed this to:


In a few weeks, I plan to write up the detailed instructions on building QtLua for Visual Studio on Windows and providing an updated example solution if anyone wants it. I still need to work out why CMake is failing to set things like HAVE_LUA_GC and HAVE_UI_TOOLS correctly.

Jeff S.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]