VR-Forces 4.7 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
18.7 - How To Build Examples

Table of Contents

18.7.1 Introduction

The examples are pre-compiled and installed by the SDK installer so it is not necessary to build them in order to try them out. To activate the pre-built plug-ins, please see section "5.9.1. Loading a Plug-in", in VR-Forces Users Guide.

18.7.2 Prerequisites

Before you can build an example or a custom application, you must install the supporting software that your installation depends on and you must configure environment variables, so that the example project files can find these prerequisites.

You must do the following:

18.7.3 Building the VR-Forces Examples

To build VR-Forces examples, simply open the project file of the example you wish to use and build it. The newly built DLL or shared object will automatically be copied to the "build" directory where it can be loaded via the Plug-in management interface documented in section 5.9. "Managing Plug-ins", in VR-Forces Users Guide. Stand-alone executables will automatically be copied into the "bin" directory.

18.7.4 VR-Vantage Examples

The examples/VR-Vantage directory contains examples from VR-Vantage (upon which VR-Forces is based). Not all the examples from VR-Vantage are present, specifically any examples of VR-Vantage IG and any others which are either not relevant to or which are duplicated by VR-Forces examples.

The plug-in system used by VR-Vantage is different than that of VR-Forces and will require different steps in order to use the examples. Since the VR-Vantage examples are shipped pre-built, it is not necessary to build them. If you wish to use them, however, you can do so in one of two ways:

1) Copy the individual VR-Vantage example from it's built directory to the apporporiate plugin[64] directory (debug or release). When the gui is run it will automatically load the plugin. For example you can copy the exampleAccessor plugin from C:.5\examples\exampleAccessory\build64\RelWithDebInfo\exampleAccessory.dll to the plugins64 directory 2) Use the –plugin command line. For example, to load the exampleSymbolFacade1.dll example:

vrfgui --dis --plugin ..\examples\exampleSymbolFacade1\build64\RelWithDebInfo\exampleSymbolFacade1.dll

18.7.5 Files

You can use the CMAKE program (found at cmake.org) to regenerate distributed project examples or to generate your own project from a CMakeLists.txt file.

In order to generate project files using cmake you will need to have at least version 2.8 of cmake installed on your system. You will then need to open a shell window and change your directory to your VR-Forces install's main directory directory. You can use cmake –help to see what compilers are available. You can then choose your compiler to build your project files. For example, if you wish to generate a VC12 2013 set of project files you would execute the following command:

cmake -G "Visual Studio 12 2013 Win64"

This will regenerate all project files and incorporate any changes you may have made and create a vrforcesExamples_64.sln solution.

It will also automatically generate the necessary moc or uic statements for additional Qt sources.

You may create your own example project by copying one of the existing projects and modifying the CMakeLists.txt file to subsitute in your project name. Once created you will need to add your example to the CMakeLists.txt file in the examples directory in the appropriate protocol or non-protocol section.

[<< Creating and Initializing the Simulation Engine] [Home] [Top of Page]


Document ID: Generated on Fri Apr 26 21:53:14 EDT 2019 from SVN revision 197883
Copyright © 2005-2019 VT MAK. All Rights Reserved (www.mak.com)