PathEngine home previous: Static Linkagenext: Moving to Release 5
Contents, Programmers Guide, Building the Source Code, Building the TestBed for Other Platforms

Building the TestBed for Other Platforms

The 'TestBed' project can be built for both the PC (32 bit Windows) and x64 (64 bit native Windows) platforms, using the supplied Visual Studio project setup.

TestBed applications should be built with the same platform target, in each case, in order to load correctly (i.e. dlls need to be build for 32 bit Windows to run under a 32 bit Windows build of the TestBed, or for 64 bit native Windows to run under a 64 bit native Windows build of the TestBed).
In both cases the TestBed application entrypoint should be set up exactly as described in Linking with the TestBed.

TestBed_GL

A 'TestBed_GL' project is also available, for 32 or 64 bit Linux platforms, and can be built with the generic python build process described in Building with the Python Build Scripts.

TestBed_GL requires OpenGL 3.3 minimum to run, and development support libraries for OpenGL and OpenAL to build. (Try installing: libglfw-dev libglew-dev libglu1-mesa-dev libglm-dev libopenal-dev libalut-dev.)

Please note, also, that certain specific features of the DirectX TestBed build may not be supported by TestBed_GL, e.g. semi-transparent rendering.

Setting up shared objects as applications for TestBed_GL

Where TestBed loads Windows DLLs, TestBed_GL loads applications as Linux shared object (.so) files using a call to dlopen().
Note that the semantics of this are then slightly different to LoadLibrary() on Windows, i.e. the .so extension is required (not added automatically), search paths work differently, and so on.

The entrypoint declaration for testbed applications in Linux is slightly different, in that "__declspec(dllexport)" and "__stdcall" should be omitted, and the resulting code at the entrypoint should then look something like this:

extern "C"
{
    void TestApplicationEntryPoint(iPathEngine *pathengine, iTestBed *testbed)
    {
        //.. interface checking and actual application logic go here
    }
}

As on Windows the platform target for the testbed application needs to match the testbed (i.e. 32 bit shared object for a 32 bit TestBed build, 64 bit shared object for a 64 bit TestBed build) in order for the application to be loaded correctly.


Documentation for PathEngine release 6.00 - Copyright © 2002-2016 PathEnginenext: Moving to Release 5