CGFLib - A library for Computer Graphics @ FEUP
 All Classes Files Functions Variables Pages
Project setup in different IDE's

Table of Contents

Common project structure

IMPORTANT: It is assumed that you have installed the dependencies specific to your system as explained in the Dependencies of CGFLib page and downloaded the source package available at the Downloads page.

The library and example project provided in the Downloads page comprise a series of folders for organizing code, compilation output and runtime assets such as shaders and textures:

Additionally, project files for Visual Studio and Eclipse are provided, as well as makefiles for GNU Make.

The following sections provide details to take into account when setting up a project in each of these environments.

Visual Studio

The source package includes a Visual Studio 2010 solution containing two projects, one for building the library, and another for building the example. Rebuilding the whole solution will:

Check the following subsections for VS version-specific notes.

Visual Studio 2010

There is a pre-compiled package for those using VS 2010. It contains only the example project, and the CGFlib.lib and header files are already placed in the corresponding folders of that project. It assumes that dependencies have been taken care of.

Visual Studio 2012

For VS 2012 there is currently no pre-compiled package. You have to install the appropriate dependencies, and use the source package solution and projects in VS 2012. Some pitfalls you should be aware about (courtesy of Daniel Nora):

Eclipse

For both Windows and Linux, it is necessary to have the Eclipse CDT plugin installed - http://www.eclipse.org/cdt/.

You should import both projects (CGFlib and CGFExample) into the workspace, build the library, copy it to the example project, and then build the example, as described below:

After initial setup, new builds of the example only require the last steps: build and Run, or just run if the automatic building before running is enabled

Notes

If you have customised paths for your compilation tools, update the project properties according to those paths:

Makefile

Makefiles are also provided for GNU Make/GCC environments. Executing 'make' on the corresponding folders should compile and build the library and/or example. Executing 'make' on the parent directory of both projects will build the library, copy the files to the example, and build the example.