PathEngine home previous: Customising Memory Managementnext: Building without 2D Content Processing
Contents, Programmers Guide, Building the Source Code, Static Linkage

Static Linkage

The full source package enables your application to link directly with the set of static libraries out of which the PathEngine DLL is composed.

This is also possible with the the interface layer package, but is not generally recommended because of the constraints this imposes on the application compilation environment (see The Interface Layer Package for details).

With the full source package you can build PathEngine's static libraries with the same compiler as is being used by the rest of the application, which ensures link compatibility for things like run-time library linkage, calling conventions, and so forth.

Initialising the SDK and obtaining and obtaining a root interface pointer is then just a case of calling PathEngine_InitialiseAndObtainRootInterface.

Explicit shutdown and reinitialisation

If desired, the SDK can be explicitly shutdown, with PathEngine_ShutDown (and also subsequently reinitialised).

Memory instrumentation and static linkage

PathEngine's memory instrumentation uses a very simple technique based on over-riding global new and delete operators, and is designed for use with the DLL build of the SDK.

Example code

An example project for static linkage against the SDK is provided in 'SDKRoot/LinkageExamples/LinkageWithSharedObject' (included with the source archives).

The example project directory includes a Visual Studio project for the PC (Windows-x86) platform, and a python script to build on GCC based platforms.

The Visual Studio project is essentially a vanilla console exe project with the PathEngine interface directory added to the includes path, and the set of PathEngine static libraries added to linker input.
Run the generated exe from a console, or debug through execution, and you should see the line 'Simple test completed successfully.' being output.

The python script uses the same platform config as the main python build scripts, and requires the same environmental variables setup.
(Refer to Building with GCC for details.)
To run the script simple change directory to the example project directory, and type 'python Build.py'.
The script simply dispatches the required compile and link commands. If you're not familiar with python that you can nevertheless refer to the output of this script for the command lines used.


Documentation for PathEngine release 5.16 - Copyright © 2002-2008 PathEnginenext: Building without 2D Content Processing