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 2005 project file for Windows platforms and Makefiles for non-windows platforms (eg. Makefile.linux, Makefile.solaris-sparc, 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 2005 project file, typically named examplename.vcproj (eg. regex-1.vcproj). 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 gmake <BUILD_MODE=[DBG|OPT]>
*
* BUILD_MODE is optional. DBG is the default if not specified.
* All files will be output to a sub-directory named linux-DBG or linux-OPT
* depending on the BUILD_MODE.
*
* Targets:
*
* default - Build the example
* help - Display this help message
* clean - Destroy targets for the specified build mode (default is DBG)
* cleanall - Destroy targets for all build modes
* rebuild - Clean and make specified build mode (default is DBG)
* $
*

Building a debug version of the examples:

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

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