Framework Build Instructions
Mar 26.
Introduction
The framework code is built using standard C++ tools. We adopt C++11. Unix/Linux/OS X users must use gcc
version 4.7.2 or later or clang
version 3.1 or later. Windows users will need to use the latest version of MinGW
. For an integrated development environment (IDE), we suggest Qt Creator
version 2.7.0.
Build the project from command line
- Run command shell
- WINXP:
Start->Run->cmd.exe
- WIN7:
Start->Search
files and folders / cmd.exe
- Unix: start your favorite terminal
- OSX: start
Terminal.app
- Go in your project directory
- If you need, change the compiler name in
Makefile
; it is set to gcc
(MinGW
) by default.
- Execute command:
make
Installing MinGW on Windows
- Download latest version of MinGW from http://sourceforge.net/projects/mingw/files/latest/download?source=files.
- Launch the executable setup file and click "Next" until "Repository Catalogues" tab
- Select "Download latest repository catalogues" and click on "Next"
- Follow the instructions and click on "Next" until "Select Components" tab
- Select "C compiler", "C++ compiler" and "MSYS Basic System" and click on "Next"
- Proceed with installation
- Once installation is finished add the following two paths to your system PATH:
C:\{MinGW Folder}\bin
and C:\{MinGW Folder}\msys\1.0\bin
- To check your installation, in a new command shell run
gcc -v
, which should display that the gcc version is 4.7.2
and gcc
is on the path.
Using Qt Creator IDE
- Install
- Configure
- Select
Tools->Options
- Select
Build & Run->Compilers
- If you see the appropriate compiler under the
Auto-detected
list (gcc 4.7.2, clang 3.1, mingw gcc 4.7.2), continue to Kits
item below
- Otherwise, Click the "Add" button and select the appropriate option
- Enter an identifiable name
- Enter the correct path to compiler
- Click "Apply"
- Select
Build & Run->Kits
- Select
Desktop (default)
- In the "Compiler" drop-down box, choose the appropriate compiler (see
Build & Run->Compilers
above)
- Click "Auto-Detect" next to Debugger if it is empty;
GDB
or an appropriate debugger should show
- Click "OK"
- Import project
- Open Qt Creator
- Select
File->New File or Project...
- Select
Import Project->Import Existing Project
, and click "Choose..."
- Under "Location",
- Enter an appropriate name for "Project Name" (e.g.,
Assignment01
)
- Click "Choose...", browse to the root folder for the assignment containing
src
folders, then click "Select Folder"
- Click "Continue"
- Under "File Selection", click "Continue"
- Under "Summary", click "Done"
- Build
- If you are using the
clang
or MinGW
compiler, change the compiler name in Makefile
; it is set to gcc
(MinGW
) by default.
- For
MinGW
, change line 5 to be CC=g++
- Choose
Build->Build all