Tutorial: Preparing your project

From DaevsGUI

Jump to: navigation, search

WARNING: This page is outdated

Linking

Get the latest binary release or compile from source. This will give you a library file (be it static or dynamic).

[TODO: add documentation for dynamic libraries]

CodeBlocks

Go to Project in the menu bar, Build Options, select the projects name or one of the build targets (if you only want to use it for a certain build target) on the left list, go to Linker settings and Add a new library called DaevsGUI. Also add opengl32 and glu32 if you haven't already.


You will most likely use other 3rd party libraries that are used by DaevsGUI, such as SDL, Corona or FreeType2. These have to be linked to as well!

An example of linker settings using MingW, SDL, Corona and FreeType2:

mingw32
SDLmain
SDL.dll
DaevsGUI
opengl32
glu32
corona
freetype2

Including

Once linked, we also need to include header files. On top of your source files that will use DaevsGUI, add:

#include <daevsgui/daevsgui.hpp>

This will include all header files of the library. Make sure the header files are, within the directory daevsgui, inside a search directory.

Views
Personal tools
Other