|
From: | Jeff Sprenger |
Subject: | [Libqtlua-list] QtLua build on Windows |
Date: | Tue, 23 Jul 2013 11:31:52 -0400 |
User-agent: | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 |
I need help building QtLua for Windows7/64. If you're interested in
a Windows build or have done this successfully, please read on. Item #4 is where I'm stuck. I've read previous posts by Alexandre Becoulet, Evan Comes and Gedalia P. AFIK, no one has successfully built QtLua on Windows using Visual Studio and the MS compiler. (I understand if people hate that environment and recommend a g++ linux build or mac build, but this is not a choice for me - it's a requirement) Here's what I've done and what I've observed. 1. The lua5.1 libraries builds on Windows no problem. 2. For QtLua, I used git to get the source, then CMake to create the VS2010 solution, which has some problems. a. Some functions don't return a value when expected - after a call to abort(). Alexandre Becoulet has recommended adding this return after the abort() to satisfy the compiler, which works: return ValueRef(Value(_ls), Value(_ls)); 3. In the QtLua code, the function State::gc_collect() calls lua_setgcthreshold(), which is no longer available Lua 5.1 (was in Lua5.0). Changing this to just call lua_gc() or setting HAVE_LUA_GC in the CMake config seems to satisfy the problem. 4. Building just the project "qtlua" in Visual Studio does succeed and outputs qtlua.dll but no import library (qtlua.lib). When I try to build ALL_BUILDS (the other projects) that are part of the solution, the builds fail because the other projects can't find qtlua.lib. It seems this happens because there are no EXPORTS in the qtlua.dll. My guess (help me here) is that some of the functions in qtlua must be declared as __declspec(dllexport), which then will be packaged into the import library. 5. I tried earlier to build Qtlua using cygwin with CMake and mingw-32, but got nowhere. Seems that cygwin and CMake don't always play well together. I am building on Windows7/64 bit, using Visual Studio 2010 professional. I feel like I'm almost there. Any help is welcome. I will fully document the build process once I get it to work and share it here, so that others do not have to wander through the same abyss. Thanks, Jeff S. |
[Prev in Thread] | Current Thread | [Next in Thread] |