Getting started with qibuild on Windows
Install CMake ¶
. Get the latest version from
and make sure that
is in your
It also means that
is compatible with every compiler supported by
Install a compiler ¶
On windows, the best supported ways to use qibuild is with
- Visual Studio
- or QtCreator (using mingw)
First run ¶
You should run
$ qibuild config --wizard
The first time you run qibuild and then answer the questions.
A file will be generated in
It is shared by all the worktrees you will create.
You will ask to choose a CMake generator. The generator you want to use depends on how you wish to use qibuild Configuring qiBuild
Note that you can run
to get a look at your current
settings, and change them by editing the XML files, or re-running
Building with Visual Studio ¶
You will have to make sure CMake uses the proper generator for qiBuild to work with Visual Studio.
Note when using Aldebaran packages, 64bits support is not available. You can still use Visual Studio on a 64bits machines to build and run 32 bits executable with a 32bits SDK, though.
Here is what a complete
would look like to use Visual Studio 2010
<qibuild version="1"> <defaults> <cmake generator = "Visual Studio 10" /> </defaults> </qibuild>
Then just open the
that will be generated in the build directory.
If you want, you can also use an other generator than Visual Studio. You may build faster using an other generator, at the cost of not having an IDE to browse your source code.
If you choose to do so, you should either:
- Run qibuild from the Visual Studio command prompt
Or specify a
.batfile to be ran by qibuild, like this
<qibuild version="1"> <defaults> <env bat_file="c:\Program Files\Microsoft Visual Studio 10\VC\vcvarsall.bat" /> </defaults> </qibuild>
(the location of the
file depends on your setup)
Then, you can choose an other generator such as
<qibuild version="1"> <defaults> <cmake generator="Ninja" /> </defaults> </qibuild>
Configuring qiBuild for QtCreator ¶
The preferred way to use qibuild on Windows is with Visual Studio, and please note that Aldebaran does not provide a C++ SDK for mingw.
But, if you do not want to use Visual Studio, you can still use qibuild with QtCreator and the mingw package that comes with it.
- Get the latest QtCreator and install it. (you only need the QtCreator package, no need for the full-fledged Qt SDK)
- Add the MinGW’s path to your %PATH% so that QtCreator can find mingw32-make without running qmake
- Tell qibuild to use “MinGW Makefiles”
Here is what a complete
would look like to use MinGW with QtCreator
<qibuild version="1"> <defaults> <env path="C:\QtSDK\mingw\bin" /> <cmake general="MinGW Makefiles" /> </defaults> </qibuild>
qibuild never modify os.environ globally, so the executable you just built won’t run unless you have mingw’s DLLs in your PATH, but it should run from QtCreator without problems
Please read the
section to learn how to build from
Configuring qiBuild for MinGW with Msys ¶
You will have to do several things for qibuild to work with MinGW.
- Set PATH properly so that make.exe and gcc.exe are found
- Make sure CMake uses the correct generator
Here’s what a complete
would look like to use MinGW
<qibuild version="1"> <defaults> <env path="C:\Mingw\bin;C:\MinGW\msys\1.0\bin;" /> <cmake generator = "Unix Makefiles" /> </defaults> </qibuild>
here you have to setup a complete
environment before being
able to use qibuild.
Using JOM ¶
Get the JOM package from here:
and extract it, for instance in
Then, add jom to you path and use MinGW Makefiles JOM generator:
<qibuild version="1"> <defaults> <env bat_file="c:\Program Files\Microsoft Visual Studio 9.0\VC\vcvarsall.bat" /> path="C:\Jom109" /> <cmake generator = "NMake Makefiles JOM" /> </defaults> </qibuild>
Using Ninja ¶
Ninja is a small build system with a focus on speed.
is supported by
since 2.8.10, and by
is still experimental, but by using it
you should experience faster compilations, especially during incremental
First, get ninja from github and compile it:
$ git clone git://github.com/martine/ninja.git $ cd ninja $ python ./bootstrap.py
On Windows, you need to run this form the Visual Studio command prompt so that cl.exe can be found, or, if you are using mingw, from a mingw command prompt
Then make sure that
is in your PATH.
To use it, edit
to look like:
<qibuild version="1"> <build /> <defaults> <cmake generator="Ninja" /> </defaults> </qibuild>
Or just re-run