Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Building The Examples

Overview

The examples provided with SKC are installed into the examples directory under the installation directory, and are grouped in subdirectories by component.

Each example is included with a Visual Studio 2008 project file for Windows platforms and Makefiles for non-windows platforms (eg. Makefile.linux, etc.). The Makefiles are written for use with gmake on all non-windows platforms.

Building Examples On Windows

Each example comes with a Visual Studio 2008 solution, typically named examplename.sln (eg. regex-1.sln). Building is just a matter of loading the project into Visual Studio and selecting "Build Solution" from the Build menu (F7). The output wil be placed in either the "Debug" or "Release" directory depending upon which build configuration is chosen (default: Debug).

Building on Non-Windows

By default, the makefiles are setup to build in debug mode. You can get help by using the help target like this:

* $ gmake -f Makefile.linux help
*
* USAGE make <BUILD_MODE=[DBG64|DBG32|OPT64|OPT32]>
* BUILD_MODE is optional. DBG64 is the default if not specified.
* All files will be output to a sub-directory named <platform>-DBG64/32 or OPT64/32
* depending on the BUILD_MODE (eg. "linux-DBG64").
*
* Targets:
*
* default - Build the example
* help - Display this help message
* clean - Destroy targets for the specified build mode (default is DBG64)
* cleanall - Destroy targets for all build modes
* rebuild - Clean and make specified build mode (defaultis DBG64)
* $
*

Building a debug version of the examples:

* $ gmake -f Makefile.linux BUILD_MODE=DBG32
* ex-loader.cpp
* p6api.cpp
* Linking linux-DBG32/ex-loader ...
* Copying SKC components to output directory ...
* $
*

The makefile automatically copies all the SKC components and language files into the output directory (linux-DBG32 in the above example) on success. This allows you to immediately run the example. You will need to copy your license file into the output directory as well prior to running the example.