Compiling on Windows 7

User avatar
chris
Posts: 493
Joined: Fri Jun 17, 2011 5:39 am

Compiling on Windows 7

Post by chris »

Here's a wiki I put together on a fresh compile.

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

User avatar
Vadi
Posts: 5035
Joined: Sat Mar 14, 2009 3:13 pm

Re: Compiling on Windows 7

Post 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).

Daagar
Posts: 89
Joined: Fri Feb 19, 2010 2:42 am

Re: Compiling on Windows 7

Post by Daagar »

This looks excellent. I haven't yet run through it myself, but hope to do so this weekend.

Daagar
Posts: 89
Joined: Fri Feb 19, 2010 2:42 am

Re: Compiling on Windows 7

Post 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.

User avatar
chris
Posts: 493
Joined: Fri Jun 17, 2011 5:39 am

Re: Compiling on Windows 7

Post by chris »

What's your path?

Daagar
Posts: 89
Joined: Fri Feb 19, 2010 2:42 am

Re: Compiling on Windows 7

Post 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

User avatar
chris
Posts: 493
Joined: Fri Jun 17, 2011 5:39 am

Re: Compiling on Windows 7

Post 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.

Daagar
Posts: 89
Joined: Fri Feb 19, 2010 2:42 am

Re: Compiling on Windows 7

Post 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.
Last edited by Daagar on Thu Aug 08, 2013 3:42 am, edited 2 times in total.

User avatar
chris
Posts: 493
Joined: Fri Jun 17, 2011 5:39 am

Re: Compiling on Windows 7

Post by chris »

What's your machine type? I compiled on a Windows 7 x64 Intel i7 ivybridge

Daagar
Posts: 89
Joined: Fri Feb 19, 2010 2:42 am

Re: Compiling on Windows 7

Post 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).

Post Reply