2.2. General Instructions

The qtHaskell version 1.1.10 distribution file qtHaskell-1.1.10.x.tar.gz should be expanded in some suitable directory hereafter referred to as myqthlocation. "cd" to the directory myqthlocation/qtHaskell-1.1.10.x. QtHaskell can then be built on most Linux systems using the bash script

./build

or on Windows systems by running ("as Administrator" on Vista or later) the batch file

build

Both these commands call the qtHaskell cross-platform Perl build script in its default mode with no options. The Perl script can also be run in this mode with the command

perl build.pl

This script will build both the C++ component and the Haskell component of qtHaskell for all 50 or so qtHaskell modules and also compile all the example applications contained in the directories myqthlocation/qtHaskell-1.1.10.x/examples and myqthlocation/qtHaskell-1.1.10.x/demos.

To build only a common set of modules (core, gui, widgets, network, opengl, xml, uitools, script, xmlpatterns and printsupport) required to build all demo and examples code use the following command

./build lite

For a faster build add -jx to build commands e.g.

./build lite -j4

The build script is highly controlable, allowing every major phase and subphase of the build to be enabled or disabled. It should however build qtHaskell without any options (other than those mentioned above) on Linux and Windows systems (MacOS may require one option for correct linking). A full list of the build script options syntax and semantics is in the section:


      Chapter 4, Using the Perl Build Script
      

The Linux instructions should be very close to what is required on most Unix type systems. This includes MacOS, but MacOS users should note the following points:

1. The Qt qmake tool used to generate the Makefiles used to build the Qtc wrapper libraries does not generate Makefiles by default on MacOS. The option -spec macx-g++ is required. This is used by the build script and must be used in any manual builds.

2. The build script parameter --extra-ld-option=--architecture=x86_64 may be required. See the section


      Section 4.4.43, “extra-ld-opt”
      

for short forms of this option.