Page 1 of 4

Compiling on Windows 7

Posted: Wed Jul 31, 2013 11:51 pm
by chris
Here's a wiki I put together on a fresh compile.

http://wiki.mudlet.org/w/Compiling_Mudl ... _Windows_7

Re: Compiling on Windows 7

Posted: Thu Aug 01, 2013 3:37 am
by Vadi
Looks very thorough! Thank you!

Reminds me that we should update the rest of instructions for Qt 5.1. And the readme in git to point to this page (or copy it).

Should it end on "Now copy the contents of from LuaRocks/lib/lua/5.1 to the mudlet release directory"? Might be good to mention how to run Mudlet once you compile it (even if it's a simple double-click mudlet.exe that's in src folder).

Re: Compiling on Windows 7

Posted: Thu Aug 01, 2013 11:40 pm
by Daagar
This looks excellent. I haven't yet run through it myself, but hope to do so this weekend.

Re: Compiling on Windows 7

Posted: Sun Aug 04, 2013 3:27 pm
by Daagar
Okay, had a chance to run through it, and get right to the end before things blow up. I have a handful of notes of changes/fixes to what is posted, but since I don't have a working mudlet at the end I'll hold off until it does.

The current issue I'm facing is that I get a fully compiled mudlet.exe, but attempting to run it results in a "The procedure entry point InterlockedCompareExchange@12 could not be located in the dynamic link library libstdc++-6.dll" error. There are a slew of versions of libstc++-6.dll on my system that I've tried using in place of the mingw32 version, but no luck. On occasion, I can get a magic combination of .dlls that gets past this error and will launch the app, but with numerous msvcr80.dll errors (but the app "runs", mostly).

The things that come to mind are 1) This is some form a win32 vs win64 issue (I'm on Win7 64bit), or 2) this is something to do with using Qt 5.1.0 which has an older version of mingw32 providing things like 'qmake', while were using a newer mingw32 for compiling everything. I'm wondering if different things are binding to different versions of the same .dll and blowing up. Interestingly, I did try compiling with only Qt 5.1.0's mingw32 and couldn't even get hunspell to compile cleanly.

Re: Compiling on Windows 7

Posted: Sun Aug 04, 2013 3:42 pm
by chris
What's your path?

Re: Compiling on Windows 7

Posted: Sun Aug 04, 2013 3:51 pm
by Daagar
Nothing fancy (this is without any of the mingw32 paths included - I've tried with as well):
Path=C:\Users\Daagbox-NG\AppData\Local\GitHub\PortableGit_93e8418133eb85e81a81e5e19c272776524496c6\cmd
;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;D:\dev\scm\TortoiseGit\bin

Re: Compiling on Windows 7

Posted: Wed Aug 07, 2013 12:05 pm
by chris
Try something similar for your path:
C:\mingw32\i686-w64-mingw32\include
c:\mingw32\
C:\mingw32\bin
C:\mingw32\include
C:\mingw32\lib

Note you don't need Qt in your path (unless you want to throw the bin in there for qmake), Qt is all relative so it finds the libraries it needs.

Re: Compiling on Windows 7

Posted: Thu Aug 08, 2013 2:54 am
by Daagar
Thought for sure that would do the trick, but so far no go. Will try to find time to dig further.

EDIT: Progress - adding d:\dev\ide\Qt\5.1.0\mingw42_32\bin to the _front_ of my PATH gets around the libstdc++ error. This does confirm that I'm in good ol' .dll hell as I suspected, I was simply choosing the wrong .dlls to use (I was taking the .dlls from my mingw32\bin folder, not from Qt's mingw42_32\bin folder). Not sure what impact this will have, if any, but things load now :)

I'll probably try again compiling with just the mingw32 provided by Qt, rather than via the newer version.

EDIT2: To answer the below, this is a Win7 64bit i5 ivybridge.

Re: Compiling on Windows 7

Posted: Thu Aug 08, 2013 3:04 am
by chris
What's your machine type? I compiled on a Windows 7 x64 Intel i7 ivybridge

Re: Compiling on Windows 7

Posted: Thu Aug 08, 2013 4:44 am
by Daagar
So, turns out there is a bug in the version of mingw32 shipped with Qt 5.1.0 that is the culprit:
http://csound.1045644.n5.nabble.com/Pro ... 26047.html

The solution, sadly, is to rebuild Qt with mingw32 4.8.1 since it appears there are no newer snapshots available from Qt directly. Worse, libstdc++ can still end up conflicting: http://csound.1045644.n5.nabble.com/Cso ... 26253.html (which may or may not affect mudlet, depending on what's actually being used in that .dll).