Clone wiki

codetrainer / Prerequisites

C++ compiler

You need a C++ compiler in order to build the framework.

Microsoft Visual C++

Visual C++ Express 2010 & 2013 were used. The instructions here can easily be applied for other Visual Studio versions. In theory this project should work fine with VS 2010,2012,2013 but was tested only with 2010 and 2013.


Code Trainer uses wxWidgets 3.0. More information on how to compile wxWidgets can be found here.


This is useful only for creating GUIs in wxWidgets. For building the application it is not needed. It will be used to create/edit existing GUI applications. Get it from here.


Cmake is used to generate cross platform build systems (makefile, visual studio projects etc). It can be downloaded from here (download the installer).

Make sure you get a newer version (We tested with cmake 3.2.1).

On Windows you must set the WXWIN environment variable to your wxWidgets directory to help cmake find the wxWidgets package (documented on the wxWidgets compilation page). For portaudio package to be found by cmake you should set the PORTAUDIO_PATH environment variable (this is also documented on the portaudio compilation page and also below in this page).

Make sure cmake is in the PATH environment variable. If it isn't add it. How to test this: - open a new command prompt (windows key + r, write cmd, press enter) and write "cmake". If you get an error message, cmake is not in the PATH. You should see as output a list of cmake available commands.

mercurial client

This means Tortoise hg (unix/windows). This is used to obtain the source code from the repository. Get the read only repo:

portaudio - needed only for Code Trainer version 2.0 and newer

In order to generate sound in the audio card we are using portaudio. On Windows this is what you must do:

  1. Download portaudio from this link: (choose the latest stable release)
  2. Extract the archive portaudio into a folder without spaces (I used C:\Code\portaudio). To make sure you've done things correctly check if the include directory is in that path (in my case C:\Code\portaudio\include)
  3. Set the PORTAUDIO_PATH environment variable to the path where portaudio is extracted (C:\Code\portaudio in my case)
  4. Compile the portaudio library. For this follow the instructions for Building portaudio with Visual Studio

inno setup

This is optional. It is used to create an installer for the application. Inno setup is one of the many installation software for Windows. In order to make it run with codetrainer you should do at least one of the following:

  • Install it in a "normal" path so that the build script finds it.
    • By normal path we mean one of the following paths:
      • C:\Program Files\Inno Setup 5\
      • C:\Program Files (x86)\Inno Setup 5\
  • Make sure you set the PATH to its installation folder. Assume the folder is X:\My Progs\Inno Setup you need to do set the PATH like this:
    • RIght click on My Computer/This PC -> Properties -> Advanced System Settings -> Advanced (Tab) -> Environment Variables (Button)
    • Append to the user PATH variable the path to the installation setup. PATH for user should be:
      • if no PATH for user exists:
        • %PATH%;X:\My Progs\Inno Setup
      • if PATH already exists simply put the installation directory at the end separated by semicolon ;
        • .........previous value...........;X:\My Progs\Inno Setup

NOTE: If you want to set the system path (for all users) then simply append the inno setup installation folder (X:\My Progs\Inno Setup in our example) separated by ; (similar to second case for user PATH variable above)