Chapter 2. Installing qtHaskell

Table of Contents

2.1. Introduction and System Requirements
2.1.1. Perl
2.1.2. Haskell Dependencies
2.1.2.1. OpenGL Dependencies
2.1.2.2. Parallel Dependencies
2.1.3. Building with Qt verion 5.11.x or higher on Windows systems
2.2. General Instructions

2.1. Introduction and System Requirements

qtHaskell consists of two components, a C++ layer built using the Qt build tool qmake and a Haskell component built using the Haskell build tool Cabal. qtHaskell requires Qt (5.11 or later) and GHC (version 8.2 or higher) to be available on any system in which it is installed. Version 1.1.10 of qtHaskell has been tested with versions 5.11 and later of Qt and with versions 8.2 and later of GHC on Linux and Windows systems. The previous version of qtHaskell was reported as working without any problems on MacOS, but users are advised that at release, version 1.1.10 has been tested only as described above. Feedback from users of other environments is welcome.

2.1.1. Perl

The recommended method for building qtHaskell-1.1.10 is to use the build script included with this release. This is a cross-platform Perl script which requires version 5.10 (or later) of the Perl language. This a later version of Perl than is provided with current GHC distributions.

A suitable version of Perl for all major systems is available for free. See www.perl.org/get.html. Strawberry Perl is the recommended version for Windows builds of qtHaskell.

2.1.2. Haskell Dependencies

The qtHaskell-1.1.10 moduels do not have any dependencies except those that are noramlly available to basic GHC instllation. Only OpenGL is required for the modules to build, since that is a requirement for many GUI solutions but even OpengGL is not strictly needed. Most qtHaskell applications will require other Haskell libraries and those that are required for all the demos and examples are installed by the build script if required.

2.1.2.1. OpenGL Dependencies

qtHaskell has been tested with OpenGL-3.0.2.2

2.1.2.2. Parallel Dependencies

Previous versions of the extra package qt-glome required the Parallel library. This is not the case for qtHasekll-1.1.10 but it may be required in subsequent releases

2.1.3. Building with Qt verion 5.11.x or higher on Windows systems

Qt version 5.11.x or higher on Windows requires version 4.4 or later of the Gnu C++ compiler and associated build tools. These are provided with Qt version 5.11.x or higher for Windows. They are not compatible with the MinGW tools provided with the GHC distributions for Windows.

With version 8.2.x or higher of GHC this problem can be overcome as follows. Simply copy the MinGW directory of your Qt distribution over the MinGW directory of your GHC distribution, and proceed with your qtHaskell installation as normal.

This is not possible with earlier versions of GHC (i.e. 8.1.x or earlier). It is therefore essential in order to build qtHaskell-1.1.10 with Qt version 5.11.x or higher on Windows, that you use GHC 8.2.x or higher and follow the above instructions.

N.B. you must make sure your path environment variable is set to the correct versions of MinGW, Haskell and Qt. You can test this prior to starting the build script by typing

g++ --version

qmake --version

ghc --version

You should check in particular that the version of g++ is 4.4 or later otherwise the Qtc wrapper libraries will not link correctly.