15.3 Building ClanLib


15.3 Building ClanLib

Once the library is downloaded, all the required files should be extracted to a common folder. The first aim is to compile all the source code into a LIB (library) file, which is a compiled version of the code; this compiled version is then linked to any new projects created that intend to use the ClanLib library. To do this, a programmer should open the source code files or project files in the IDE of his choice-Code::Blocks, Visual Studio, etc.-and then build the project using the standard compilation options explained in the previous chapters.

Upon compilation, this will generate a successful LIB file. This file contains information about all the classes and functions ClanLib uses. In order to compile ClanLib applications, your compiler needs to be linked to this file. This simply means you need to provide the compiler with the pathname to this file so it knows where to find it. You can do this via the Compiler Options dialog.

In Visual Studio:

  1. Click Project | Properties.

  2. Click the Linker node.

  3. Click Input.

  4. Enter the LIB file into the Additional Dependencies edit box.

In Code::Blocks:

  1. Click Project | Build Options.

  2. Click the Linker tab.

  3. Click the Add button to add the LIB file.




Introduction to Game Programming with C++
Introduction to Game Programming with C++ (Wordware Game Developers Library)
ISBN: 1598220322
EAN: 2147483647
Year: 2007
Pages: 225
Authors: Alan Thorn

Similar book on Amazon
Beginning C++ Through Game Programming
Beginning C++ Through Game Programming
Beginning Game Programming
Beginning Game Programming
The Ultimate Guide to Video Game Writing and Design
The Ultimate Guide to Video Game Writing and Design

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net