![]() |
VR-Link C# API Documentation
|
This section describes the steps required to compile and link a VR-Link application using the provided libraries and build tools.
To build a VR-Link application, you must tell the compiler where to find the VR-Link header files, and for HLA, the RTI header files.
To successfully configure a VR-Link application, set the following environment variables:
MAK_VRLDIR: Path to the root of the VR-Link installation.MAK_RTIDIR: Path to the RTI installation root.RTI_RID_FILE: Path to the MAK RTI install's rid.mtl file.MAK_COMPILER_ID: Set to a supported compiler version (e.g., VC15). If left blank (""), this indicates a Linux compiler.QTDIR: Path to the Qt installation (if required).PATH: Should include paths to VR-Link binaries, any required third-party tools, and the bin64 directory of the MAK RTI installation so the VR-Link application can locate required DLL files.LD_LIBRARY_PATH (Linux): Include VR-Link and third-party library paths.#define DT_USE_DLL 1Supported compilers may vary by VR-Link version and platform. Please refer to the Release Notes or the MAK Product Specifications page ({https://www.mak.com/mak-one/support/help/specs/}{MAK Product Specifications}) to see which compilers are supported for your version of VR-Link.
On Windows, VR-Link supports the use of any Visual Studio IDE as long as the correct compiler is supported and used as detailed above. For Linux systems, VR-Link supports the compiler provided with the distribution.
Example (Windows, Visual Studio): ``` Include Directories:
Definitions: WIN32;_DEBUG;... ```
Under Windows, you can set your program's protocol following the procedures in this section. You need to provide build settings in Microsoft Visual Studio to define constants and specify paths for header files and RTI libraries.
VR-Link includes project files for DIS and the three HLA versions. If you are building for HLA, make sure to point to the correct location of the RTI include and library directories. The default is to use the value in the MAK_RTIDIR environment variable.
Enter the following #define symbols in the space provided for preprocessor definitions:
DtHLA=1, DtHLA_1516=1, DtHLA_1516_EVOLVED=1, DtHLA_4=1, RTI_USES_STD_FSTREAM=1
In the C/C++ -> General section, in the space provided for additional include libraries, enter your VR-Link include path and the path to your RTI include directory, for example:
../../include, "c:/MAK/makRti4.6.1/include" or: /include, /include
In the Linker -> Input section, in the space provided for additional dependencies, enter the appropriate RTI, VR-Link and Visual C++ library files, for example:
{libRTI-NG_64.lib | librti1516_64.lib | librti1516e64.lib | librti1516_2025vc141.lib} {libfedtime_64.lib | libfedtime1516_64.lib | libfedtime1516e64.lib | libfedtime1516_2025vc141.lib} vl.lib vlutil.lib mtl.lib matrix.lib {vlHLA13.lib | vlHLA1516.lib | vlHLA1516e.lib | vlHLA4.lib} WS2_32.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib
Also, make sure you list the appropriate paths to these files in the "Additional Library Directories" box in the Linker -> General section, for example:
/lib64, /lib
In the C/C++ -> General section, in the space provided for additional include libraries, enter your VR-Link include path, for example:
../../include
In the Linker -> Input section, enter the appropriate VR-Link and Visual C++ library files, for example:
vlutil.lib mtl.lib matrix.lib vl.lib vlDIS.lib WS2_32.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib
List the appropriate paths to these files in the "Additional Library Directories" box in the Linker -> General section, for example:
../../lib64
To build a VR-Link application for Linux using MAK's build system, you must use gcc. Supported versions include version 8.3 and version 11.
You can select DIS or HLA at compile time by using the flags described in the following sections. VLHOME represents your VR-Link home directory.
The order of the libraries in the link line is significant. For more information, please see the Makefiles in ./examples. Other flags may be required on some platforms. For more information, please see the example makefiles and release notes.
After you install VR-Link, create a symbolic link called RTI in the top-level VR-Link directory. Point the link to the RTI distribution that you are using.
Compile Flags:**
-I{VLHOME}/include (VR-Link headers)-I{VLHOME}/RTI/include (path to MAK RTI include directory)-DDtHLA=1 (for conditional compilation)-DDtHLA_1516=1 (Use only if compiling for IEEE 1516 - 2000)-DDtHLA_1516_EVOLVED=1 (Use only if compiling for IEEE 1516 - 2010 (HLA Evolved))-DDtHLA_4=1 (Use only if compiling for HLA 4)
Link Flags for HLA 1.3:**
-Lvrhome/lib -lvl -lvlHLA13 -lmatrix -lmtl -lvlutil -lxml2 -lRTI-NG -lfedtime
Link Flags for HLA 1516:**
-Lvrhome/lib -lvl -lvlHLA1516 -lmatrix -lmtl -lvlutil -lxml2 -lrti1516 -lfedtime1516
Link Flags for HLA Evolved:**
-Lvrhome/lib -lvl -lvlHLA1516e -lmatrix -lmtl -lvlutil -lxml2 -lrti1516e -lfedtime1516e
Link Flags for HLA 4:**
-Lvrhome/lib -lvl -lvlHLA4 -lmatrix -lmtl -lvlutil -lxml2 -librti1516_2025gcc11 -lfedtime1516_2025gcc11The compile and link flags for DIS are:
Compile Flags:**
-Ivlhome/include (VR-Link headers)-DDtDIS=1 (for conditional compilation)
Link Flags:**
-Lvlhome/lib -lvl -lmtl -lvlDIS -lmatrix -lvlutil -lxml2lib/ or lib64/ (depending on your target architecture).lib/ or lib64 directory.vl library:vlDISvlHLA13vlHLA1516vlHLA1516evlHLA4libvlDIS.solibvlHLA13.solibvlHLA1516.solibvlHLA1516e.solibvlHLA4.soVR-Link uses a number of third-party libraries such as libXml2, boost, and iconv. If you are building a VR-Link application, you must include these libraries on your link line.
libXml2 library is part of the Red Hat Linux distribution. It is distributed with VR-Link for all other operating systems.boost, please visit: http://www.boost.orgSee the VR-Link Getting Started Guide, located in your VR-Link install, for the correct version of third-party libraries to use with your version of VR-Link.
[Home] [Top of Page] [Using VR-Link from C >>]