Building The Examples

Overview

The examples provided with XJR 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. json-1.vcproj). Building is just a matter of loading the project into Visual Studio and selecting "Build Solution" from the Build menu. The output wil be place in either a "Debug" or "Release" directory.

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 XJR components to output directory ... 
 $ 

The makefile automatically copies all the XJR components and language files into the output directory (linux-DBG) on success. This allows you to immediately run the example.

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines
Copyright © 2004 - 2010 P6R Inc. - All Rights Reserved.