Home > Software > HsQML - Qt Quick for Haskell

Old issues building HsQML

Windows builds with GHC 7.10.1 and earlier

The version of MinGW used by GHC releases up to and including 7.10.1 was very old and it was troublesome to find or make Qt binaries which worked with it. GHC's MinGW was upgraded in the 7.10.2 release and is currently much less problematic to use. However, if you are using an older GHC on Windows then see the instructions below:


The Qt project doesn't release official 64-bit MinGW binaries, but they are available from other sources such as the Qt64 project. Specifically, the qt-5.3.1-x64-mingw482r4-sjlj-opengl build is known to work.


Unfortunately, the version of 32-bit MinGW used by the official Qt SDK is known to be incompatible with the version of MinGW which ships with current releases of GHC and the Haskell Platform. The problem typically manifests either as an error message concerning symbols missing from libstdc++6.dll, or by compiled executables crashing on start-up.

For this reason, I have produced a special build of Qt 5.3.0 for 32-bit Windows using GHC's MinGW which can be used out of the box in place of the Qt SDK binaries. Download and unpack this zip file into the root of your C: drive so that the qt530-hp directory is unpacked into C:\qt530-hp. You must use this location as the Qt installation is not relocatable. Finally, add C:\qt530-hp\bin to your PATH variable before trying to install HsQML with Cabal.

More details about the build are present in the announcement blog post. The original source code for the libraries is available from here.

Alternatively, it also appears to be possible to work around the problem by modifying the GHC settings file to point to the gcc executable from the copy of MinGW which ships with the Qt SDK. You may find this file located at, for example, C:\Program Files (x86)\Haskell Platform\2013.2.0.0\lib\settings. The file consists of an associative list in Haskell Read/Show format. Modify the entry with the key "C compiler command" to point to the gcc.exe from your Qt install's MinGW. You must rebuild HsQML after making this change.

Robin KAY <komadori@gekkou.co.uk>