EMA C++ Compiler Settings

EMA C++ Project Settings and Templates

The following guides provide the necessary compiler and environment settings required to build and run an EMA C++ application.

Note: EMA is packaged as part of the Real-Time SDK (RTSDK) bundle.  Refer to the README file within the Ema subfolder of the RTSDK bundle for the complete list of OS and compiler support.

The EMA packages provide the ability to:

  • Build statically linked and dynamically linked binaries
  • Support for debug and release build types
  • Support for 64-bit architectures

Choose your development environment:

  EMA static libraries EMA shared libraries
Visual Studio Statically Linked Binary Dynamically Linked Binary
Linux Statically Linked Binary Dynamically Linked Binary

Windows - Visual Studio - Statically Linked Binary

Note: <RTSDK root> is a directory which is located within your RTSDK installation package

Include Path Within Properties: VC++ Directories -> Include Directories define the following:
  • <RTSDK root>\Cpp-C\Ema\Src
  • <RTSDK root>\Cpp-C\Ema\Src\Include
  • <RTSDK root>\Cpp-C\Ema\Src\Rdm\Include
Lib Path
VS2022
Within Properties: VC++ Directories -> Library Directories define only one based on your build preference:
  • <RTSDK root>\Cpp-C\Ema\Libs\WIN_64_VS143\Debug_MDd
  • <RTSDK root>\Cpp-C\Eta\Libs\WIN_64_VS143\Debug_MDd
  • <RTSDK root>\installdb\WIN_64_VS143\lib
Or
  • <RTSDK root>\Cpp-C\Ema\Libs\WIN_64_VS143\Release_MD
  • <RTSDK root>\Cpp-C\Eta\Libs\WIN_64_VS143\Release_MD
  • <RTSDK root>\installdb\WIN_64_VS143\lib
Lib Path
VS2019
Within Properties: VC++ Directories -> Library Directories define only one based on your build preference:
  • <RTSDK root>\Cpp-C\Ema\Libs\WIN_64_VS142\Debug_MDd
  • <RTSDK root>\Cpp-C\Eta\Libs\WIN_64_VS142\Debug_MDd
  • <RTSDK root>\installdb\WIN_64_VS142\lib
Or
  • <RTSDK root>\Cpp-C\Ema\Libs\WIN_64_VS142\Release_MD
  • <RTSDK root>\Cpp-C\Eta\Libs\WIN_64_VS142\Release_MD
  • <RTSDK root>\installdb\WIN_64_VS142\lib
Lib Path
VS2017
Within Properties: VC++ Directories -> Library Directories define only one based on your build preference:
  • <RTSDK root>\Cpp-C\Ema\Libs\WIN_64_VS141\Debug_MDd
  • <RTSDK root>\Cpp-C\Eta\Libs\WIN_64_VS141\Debug_MDd
  • <RTSDK root>\installdb\WIN_64_VS141\lib
Or
  • <RTSDK root>\Cpp-C\Ema\Libs\WIN_64_VS141\Release_MD
  • <RTSDK root>\Cpp-C\Eta\Libs\WIN_64_VS141\Release_MD
  • <RTSDK root>\installdb\WIN_64_VS141\lib
Lib Path
VS2015
Within Properties: VC++ Directories -> Library Directories define only one based on your build preference:
  • <RTSDK root>\Cpp-C\Ema\Libs\WIN_64_VS140\Debug_MDd
  • <RTSDK root>\Cpp-C\Eta\Libs\WIN_64_VS140\Debug_MDd
  • <RTSDK root>\installdb\WIN_64_VS140\lib
Or
  • <RTSDK root>\Cpp-C\Ema\Libs\WIN_64_VS140\Release_MD
  • <RTSDK root>\Cpp-C\Eta\Libs\WIN_64_VS140\Release_MD
  • <RTSDK root>\installdb\WIN_64_VS140\lib
Libs

Within Properties: Linker -> Input -> Additional Dependencies include the entry below:

  • libema.lib
  • librsslVA.lib
  • librssl.lib
  • libxml2.lib

System Libraries:

  • wininet.lib
  • ws2_32.lib
  • crypt32.lib
  • cryptui.lib
  • Iphlpapi.lib
  • bcrypt.lib
Compiler Settings Within Properties define all settings below:
  • C/C++ -> Precompiled Headers define: Precompiled Header: Not using Precompiled Headers
  • Linker -> Advanced: Ensure Image Has Safe Exception Handlers is blank
  • Preprocessor Definitions:
    • WIN32;__EMA_STATIC_BUILD__;
Runtime Environment No runtime environment settings required.

Windows - Visual Studio - Dynamically Linked Binary

Note: <RTSDK root> is a directory which is located within your RTSDK installation package

Include Path

Within Properties: VC++ Directories -> Include Directories define the following:

  • <RTSDK root>\Cpp-C\Ema\Src
  • <RTSDK root>\Cpp-C\Ema\Src\Include
  • <RTSDK root>\Cpp-C\Ema\Src\Rdm\Include

Lib Path
VS2022

Within Properties: VC++ Directories -> Library Directories define only one based on your build preference:

 

  • <RTSDK root>\Cpp-C\Ema\Libs\WIN_64_VS143\Debug_MDd\Shared
  • <RTSDK root>\Cpp-C\Eta\Libs\WIN_64_VS143\Debug_MDd\Shared
  • <RTSDK root>\installdb\WIN_64_VS143\lib

Or

  • <RTSDK root>\Cpp-C\Ema\Libs\WIN_64_VS143\Release_MD\Shared
  • <RTSDK root>\Cpp-C\Eta\Libs\WIN_64_VS143\Release_MD\Shared
  • <RTSDK root>\installdb\WIN_64_VS143\lib

 

Lib Path
VS2019

Within Properties: VC++ Directories -> Library Directories define only one based on your build preference:

  • <RTSDK root>\Cpp-C\Ema\Libs\WIN_64_VS142\Debug_MDd\Shared
  • <RTSDK root>\Cpp-C\Eta\Libs\WIN_64_VS142\Debug_MDd\Shared
  • <RTSDK root>\installdb\WIN_64_VS142\lib

Or

  • <RTSDK root>\Cpp-C\Ema\Libs\WIN_64_VS142\Release_MD\Shared
  • <RTSDK root>\Cpp-C\Eta\Libs\WIN_64_VS142\Release_MD\Shared
  • <RTSDK root>\installdb\WIN_64_VS142\lib
Lib Path
VS2017

Within Properties: VC++ Directories -> Library Directories define only one based on your build preference:

  • <RTSDK root>\Cpp-C\Ema\Libs\WIN_64_VS141\Debug_MDd\Shared
  • <RTSDK root>\Cpp-C\Eta\Libs\WIN_64_VS141\Debug_MDd\Shared
  • <RTSDK root>\installdb\WIN_64_VS141\lib

Or

  • <RTSDK root>\Cpp-C\Ema\Libs\WIN_64_VS141\Release_MD\Shared
  • <RTSDK root>\Cpp-C\Eta\Libs\WIN_64_VS141\Release_MD\Shared
  • <RTSDK root>\installdb\WIN_64_VS141\lib
Lib Path
VS2015

Within Properties: VC++ Directories -> Library Directories define only one based on your build preference:

  • <RTSDK root>\Cpp-C\Ema\Libs\WIN_64_VS140\Debug_MDd\Shared
  • <RTSDK root>\Cpp-C\Eta\Libs\WIN_64_VS140\Debug_MDd\Shared
  • <RTSDK root>\installdb\WIN_64_VS140\lib

Or

  • <RTSDK root>\Cpp-C\Ema\Libs\WIN_64_VS140\Release_MD\Shared
  • <RTSDK root>\Cpp-C\Eta\Libs\WIN_64_VS143=0\Release_MD\Shared
  • <RTSDK root>\installdb\WIN_64_VS140\lib
Libs

Within Properties: Linker -> Input -> Additional Dependencies include the entry below:

  • libema.lib
  • librsslVA.lib
  • librssl.lib
  • libxml2.lib

System Libraries:

  • wininet.lib
  • ws2_32.lib
  • crypt32.lib
  • cryptui.lib
  • Iphlpapi.lib
  • bcrypt.lib
Compiler Settings Within Properties define all settings below:
  • C/C++ -> Precompiled Headers define: Precompiled Header: Not using Precompiled Headers
  • Linker -> Advanced: Ensure Image Has Safe Exception Handlers is blank
  • Preprocessor Definitions:
    • WIN32;
Runtime Environment Ensure the selected Lib Path detailed above is defined within your system path

Linux - Statically Linked Binary

Note: <RTSDK root> is a directory which is located within your RTSDK installation package

Include Path

Using the header include flag (-I):

  • -I<RTSDK root>\Cpp-C\Ema\Src
  • -I<RTSDK root>\Cpp-C\Ema\Src\Include
  • -I<RTSDK root>\Cpp-C\Ema\Src\Rdm\Include
Lib Path Using the library include flag (-L), choose one based on your compiler:
Compiler EMA Lib Path
GCC suite 4.8.2 or higher for Oracle Linux 7.0 (64-bit)
  • -L<RTSDK root>/Cpp-C/EMA/Libs/OL7_64_GCC482/Debug
  • -L<RTSDK root>/Cpp-C/Eta/Libs/OL7_64_GCC482/Debug

Or

  • -L<RTSDK root>/Cpp-C/EMA/Libs/OL7_64_GCC482/Optimized
  • -L<RTSDK root>/Cpp-C/Eta/Libs/OL7_64_GCC482/Optimized
GCC suite 8.3.1 or higher for RHEL 8 (64-bit)
  • -L<RTSDK root>/Cpp-C/EMA/Libs/RHEL8_64_GCC831/Debug
  • -L<RTSDK root>/Cpp-C/Eta/Libs/RHEL8_64_GCC831/Debug
Or
  • -L<RTSDK root>/Cpp-C/EMA/Libs/RHEL8_64_GCC831/Optimized
  • -L<RTSDK root>/Cpp-C/Eta/Libs/RHEL8_64_GCC831/Optimized
GCC suite 11.4.1 or higher for RHEL 9 (64-bit)
  • -L<RTSDK root>/Cpp-C/EMA/Libs/RHEL9_64_GCC1141/Debug
  • -L<RTSDK root>/Cpp-C/Eta/Libs/RHEL9_64_GCC1141/Debug

Or

  • -L<RTSDK root>/Cpp-C/EMA/Libs/RHEL9_64_GCC1141/Optimized
  • -L<RTSDK root>/Cpp-C/Eta/Libs/RHEL9_64_GCC1141/Optimized

Libs Libraries to be linked using (-l):
  • -lema 
  • -lrsslVA 
  • -lrssl

System Libraries:

  • -lpthread 
  • -lrt 
  • -ldl
Compiler Settings Compiler flags: -DLinux -std=c++11
Runtime Environment No runtime environment settings required.

Linux - Dynamically Linked Binary

Note: <RTSDK root> is a directory which is located within your RTSDK installation package

 

Include Path

Using the header include flag (-I):

  • -I<RTSDK root>\Cpp-C\Ema\Src
  • -I<RTSDK root>\Cpp-C\Ema\Src\Include
  • -I<RTSDK root>\Cpp-C\Ema\Src\Rdm\Include
Lib Path Using the library include flag (-L), choose one based on your compiler:
Compiler EMA Lib Path
GCC suite 4.8.2 or higher for Oracle Linux 7.0 (64-bit)
  • -L<RTSDK root>/Cpp-C/EMA/Libs/OL7_64_GCC482/Debug/Shared
  • -L<RTSDK root>/Cpp-C/Eta/Libs/OL7_64_GCC482/Debug/Shared
Or
  • -L<RTSDK root>/Cpp-C/EMA/Libs/OL7_64_GCC482/Optimized/Shared
  • -L<RTSDK root>/Cpp-C/Eta/Libs/OL7_64_GCC482/Optimized/Shared
GCC suite 8.3.1 or higher for RHEL 8 (64-bit)
  • -L<RTSDK root>/Cpp-C/EMA/Libs/RHEL8_64_GCC831/Debug/Shared
  • -L<RTSDK root>/Cpp-C/Eta/Libs/RHEL8_64_GCC831/Debug/Shared
Or
  • -L<RTSDK root>/Cpp-C/EMA/Libs/RHEL8_64_GCC831/Optimized/Shared
  • -L<RTSDK root>/Cpp-C/Eta/Libs/RHEL8_64_GCC831/Optimized/Shared
GCC suite 11.4.1 or higher for RHEL 9 (64-bit)
  • -L<RTSDK root>/Cpp-C/EMA/Libs/RHEL9_64_GCC1141/Debug/Shared
  • -L<RTSDK root>/Cpp-C/Eta/Libs/RHEL9_64_GCC1141/Debug/Shared

Or

  • -L<RTSDK root>/Cpp-C/EMA/Libs/RHEL9_64_GCC1141/Optimized/Shared
  • -L<RTSDK root>/Cpp-C/Eta/Libs/RHEL9_64_GCC1141/Optimized/Shared

Libs Libraries to be linked using (-l):
  • -lema 
  • -lrsslVA 
  • -lrssl

System Libraries:

  • -lpthread 
  • -lrt 
  • -ldl
Compiler Settings Compiler flags : -DLinux -std=c++11
Runtime Environment Ensure the selected Lib Path detailed above is defined within your library path environment variable: LD_LIBRARY_PATH