Compiler and Linker Options

Sections in this Topic:

Configurations for Creating Applications and DLLs

Four configurations for creating applications and DLLs are generated in Visual Studio when you create a project using one of the RTX templates:

Compiler and Linker Options for Application Projects

The tables below list the RTSS compiler and linker options that differ from the default Windows console application options and RTX product compiler and linker options.

NOTE:  <RtxSdkDir> refers to the RTX SDK directory.

Compiler Options

General
Option RTSSDebug RTSSRelease Debug Release
Additional Include Directories $(RtxSdkDir)\include; + inherit $(RtxSdkDir)\include; + inherit $(RtxSdkDir)\include; + inherit $(RtxSdkDir)\include; + inherit
Debug Information Format /Zi /Zi /Zi /Zi
Optimization
Option RTSSDebug RTSSRelease Debug Release
Optimization Disabled (/Od) Full Optimization (/Ox) Disabled (/Od) Full Optimization (/Ox)
Whole Program Optimization No No No No
Preprocessor
Option RTSSDebug RTSSRelease Debug Release
Preprocessor Defines UNDER_ RTSS;UNICODE;_UNICODE;_DEBUG + inherit

NOTE:  Include the UNDER_RTSS_UNSUPPORTED_CRT_APIS define to see what C Runtime functions have been deprecated.

UNDER_RTSS;NDEBUG;UNICODE;_UNICODE; RELEASE; + inherit

NOTE:  Include the UNDER_RTSS_UNSUPPORTED_CRT_APIS define to see what C Runtime functions have been deprecated.

UNICODE;_UNICODE;_DEBUG; + inherit

UNICODE;_UNICODE;NDEBUG; + inherit
Code Generation
Option RTSSDebug RTSSRelease Debug Release
Enable Minimal Rebuild No (/Gm-) No (/Gm-) No (/Gm-) No (/Gm-)
Enable C++ Exceptions Yes (/EHsc) Yes (/EHsc) Yes (/EHsc) Yes (/EHsc)
Basic Runtime Checks Default Default Default Default
Runtime Library Multi-threaded Debug (/MTd) Multi-threaded (/MT) Multi-threaded Debug (/MTd) Multi-threaded DLL (/MT)
Security Check No (/GS-) No (/GS-) No (/GS-) No (/GS-)
Floating Point Model Fast (/fp:fast) Fast (/fp:fast) Fast (/fp:fast) Fast (/fp:fast)

NOTE:  Depending on the version of Visual Studio you use, floating-point settings can have an impact on API performance. The compiler option /fp:fast is used to limit the effect of floating point on performance. This retains the settings of using full optimization.If floating-point precision is necessary you can use the /fp:precise compiler flag, but be aware that doing so may affect certain API determinism. For example, functions such as log or sin will be affected. The MSDN article "Microsoft Visual C++ Floating-point Optimization" explains the compiler flags available > http://msdn.microsoft.com/en-us/library/aa289157(v=vs.71).aspx

Linker Options

General
Option RTSSDebug RTSSRelease Debug Release
Additional Library Directories $(RtxSDKDir)\lib\% + inherit $(RtxSDKDir)\lib\% + inherit $(RtxSDKDir)\lib\% + inherit $(RtxSDKDir)\lib\% + inherit
Input
Option RTSSDebug RTSSRelease Debug Release

Additional Dependencies

Visual Studio 2015

startupCRT.lib;libcmtd.lib; rtapi_rtss.lib; rtx_rtss.lib;libcpmtd.lib; libucrt.lib; libvcruntime.lib

NOTE:  libcmtd.lib and libcpmtd.lib are only available if C Runtime is included

libcpmtd.lib is only included if you selected C++

startupCRT.lib;libcmt.lib;rtapi_rtss.lib; rtx_rtss.lib;libcpmt.lib; libucrt.lib; libvcruntime.lib

NOTE:  libcmt.lib and libcpmt.lib are only available if C Runtime is included

libcpmt.lib is only included if you selected C++

NOTE:  To build Release configurations with Intel Compiler 15 with Visual Studio 2015, you will need to add the following: legacy_stdio_wide_specifiers.lib;legacy_stdio_definitions.lib;libircmt.lib

libcmtd.lib; libcpmtd.lib;rtapi_w32.lib + inherit

NOTE:  libcpmtd.lib is only included if you selected C++

libcmt.lib; libcpmt.lib;rtapi_w32.lib + inherit

NOTE:  libcpmt.lib is only included if you selected C++

NOTE:  To build Release configurations with Intel Compiler 15 with Visual Studio 2015, you will need to add the following: legacy_stdio_wide_specifiers.lib;legacy_stdio_definitions.lib;libircmt.lib

Additional Dependencies

Visual Studio 2013

startupCRT.lib;libcmt.lib;rtapi_rtss.lib; rtx_rtss.lib;libcpmtd.lib

NOTE:  libcmtd.lib and libcpmtd.lib are only available if C Runtime is included

libcpmtd.lib is only included if you selected C++

startupCRT.lib;libcmt.lib;rtapi_rtss.lib; rtx_rtss.lib;libcpmt.lib

NOTE:  libcmt.lib and libcpmt.lib are only available if C Runtime is included

libcpmt.lib is only included if you selected C++

libcmtd.lib; libcpmtd.lib;rtapi_w32.lib + inherit

NOTE:  libcpmtd.lib is only included if you selected C++

libcmt.lib; libcpmt.lib;rtapi_w32.lib + inherit

NOTE:  libcpmt.lib is only included if you selected C++

Ignore All Default Libraries Yes (/NODEFAULTLIB) Yes (/NODEFAULTLIB) Yes (/NODEFAULTLIB) Yes (/NODEFAULTLIB)
Manifest
Option RTSSDebug RTSSRelease Debug Release
Generate Manifest No (/MANIFEST:NO) No (/MANIFEST:NO) Yes (/MANIFEST) Yes (/MANIFEST)
Enable User Account Control (UAC) No (/MANIFESTUAC:NO) No (/MANIFESTUAC:NO) No (/MANIFESTUAC:NO) No (/MANIFESTUAC:NO)
System
Option RTSSDebug RTSSRelease Debug Release
Subsystem

Native (/SUBSYSTEM: NATIVE)

Native (/SUBSYSTEM: NATIVE) Console (/SUBSYSTEM: CONSOLE) Console (/SUBSYSTEM: CONSOLE)
Driver Driver (/Driver) Driver (/Driver) Not Set Not Set
Advanced
Option RTSSDebug RTSSRelease Debug Release
Entry Point _RtapiProcessEntry CRT%408 _RtapiProcessEntry CRT%408    
Randomized Base Address   Yes (/DYNAMICBASE) Yes (/DYNAMICBASE)
Target Machine MachineX86 (/MACHINE:X86) MachineX86 (/MACHINE:X86) MachineX86 (/MACHINE:X86) MachineX86 (/MACHINE:X66)

Compiler and Linker Options for DLL Projects

The tables below list the RTSS compiler and linker options that differ from the default Windows console application options and RTX product compiler and linker options.

NOTE:  <RtxSdkDir> refers to the RTX SDK directory.

Compiler Options

General
Option RTSSDebug RTSSRelease Debug Release
Additional Include Directories $(RtxSdkDir)\include + Inherit $(RtxSdkDir)\include + Inherit $(RtxSdkDir)\include + Inherit $(RtxSdkDir)\include + Inherit
Debug Information Format /Zi /Zi /Zi /Zi
Warning Level Level3 (/W3) Level3 (/W3) Level3 (/W3) Level3 (/W3)
Optimization
Option RTSSDebug RTSSRelease Debug Release
Optimization Disabled (/Od) Full Optimization (/Ox) Disabled (/Od) Full Optimization (/Ox)
Whole Program Optimization No No No No
Preprocessor
Option RTSSDebug RTSSRelease Debug Release
Preprocessor Defines UNDER_RTSS;RTX_EXPORTS;_DEBUG; + inherit

NOTE:  Include the UNDER_RTSS_UNSUPPORTED_CRT_APIS define to see what C Runtime functions have been deprecated.

UNDER_RTSS;NDEBUG; RELEASE;RTX_EXPORTS; + inherit

NOTE:  Include the UNDER_RTSS_UNSUPPORTED_CRT_APIS define to see what C Runtime functions have been deprecated.

_DEBUG;DLL_EXPORTS; + inherit

NDEBUG; RELEASE;DLL_EXPORTS; + inherit

Code Generation
Option RTSSDebug RTSSRelease Debug Release
Enable Minimal Rebuild No (/Gm-) No (/Gm-) No (/Gm-) No (/Gm-)
Enable C++ Exceptions Yes (/EHsc) Yes (/EHsc) Yes (/EHsc) Yes (/EHsc)
Basic Runtime Checks Default Default Default Default
Runtime Library Multi-threaded (/MTd) Multi-threaded (/MT) Multi-threaded Debug (/MTd) Multi-threaded (/MT)
Buffer Security Check No (/GS-) No (/GS-) No (/GS-) No (/GS-)
Floating Point Model Fast (/fp:fast) Fast (/fp:fast) Fast (/fp:fast) Fast (/fp:fast)

NOTE:  Depending on the version of Visual Studio you use, floating-point settings can have an impact on API performance. The compiler option /fp:fast is used to limit the effect of floating point on performance. This retains the settings of using full optimization. If floating-point precision is necessary you can use the /fp:precise compiler flag, but be aware that doing so may affect certain API determinism. For example, functions such as log or sin will be affected. The MSDN article "Microsoft Visual C++ Floating-point Optimization" explains the compiler flags available > http://msdn.microsoft.com/en-us/library/aa289157(v=vs.71).aspx

Linker Options

Input
Option RTSSDebug RTSSRelease Debug Release

Additional Dependencies

Visual Studio 2015

startupCRT.lib;libcmtd.lib; rtapi_rtss.lib; rtx_rtss.lib;libcpmtd.lib; libucrt.lib; libvcruntime.lib

NOTE:  libcmtd.lib and libcpmtd.lib are only available if C Runtime is included

libcpmtd.lib is only included if you selected C++

startupCRT.lib;libcmt.lib;rtapi_rtss.lib; rtx_rtss.lib;libcpmt.lib; libucrt.lib; libvcruntime.lib

NOTE:  libcmt.lib and libcpmt.lib are only available if C Runtime is included

libcpmt.lib is only included if you selected C++

NOTE:  To build Release configurations with Intel Compiler 15 with Visual Studio 2015, you will need to add the following: legacy_stdio_wide_specifiers.lib;legacy_stdio_definitions.lib;libircmt.lib

libcmtd.lib; libcpmtd.lib;rtapi_w32.lib + inherit;libucrt.lib; libvcruntime.lib

NOTE:  libcpmtd.lib is only included if you selected C++

libcmt.lib; libcpmt.lib;rtapi_w32.lib + inherit;libucrt.lib; libvcruntime.lib

NOTE:  libcpmt.lib is only included if you selected C++

NOTE:  To build Release configurations with Intel Compiler 15 with Visual Studio 2015, you will need to add the following: legacy_stdio_wide_specifiers.lib;legacy_stdio_definitions.lib;libircmt.lib

Additional Dependencies

Visual Studio 2013

startupCRT.lib;libcmt.lib;rtapi_rtss.lib; rtx_rtss.lib;libcpmtd.lib

NOTE:  libcmtd.lib and libcpmtd.lib are only available if C Runtime is included

libcpmtd.lib is only included if you selected C++

startupCRT.lib;libcmt.lib;rtapi_rtss.lib; rtx_rtss.lib;libcpmt.lib

NOTE:  libcmt.lib and libcpmt.lib are only available if C Runtime is included

libcpmt.lib is only included if you selected C++

libcmtd.lib; libcpmtd.lib;rtapi_w32.lib + inherit

NOTE:  libcpmtd.lib is only included if you selected C++

libcmt.lib; libcpmt.lib;rtapi_w32.lib + inherit

NOTE:  libcpmt.lib is only included if you selected C++

Ignore All Default Libraries Yes (/NODEFAULTLIB) Yes (/NODEFAULTLIB) Yes (/NODEFAULTLIB) Yes (/NODEFAULTLIB)
Manifest
Option RTSSDebug RTSSRelease Debug Release
Generate Manifest No (/MANIFEST:NO) No (/MANIFEST:NO) Yes (/MANIFEST) Yes (/MANIFEST)
Enable User Account Control (UAC) No (/MANIFESTUAC:NO) No (/MANIFESTUAC:NO) No (/MANIFESTUAC:NO) No (/MANIFESTUAC:NO)
System
Option RTSSDebug RTSSRelease Debug Release
SubSystem Native (/SUBSYSTEM: NATIVE) Native (/SUBSYSTEM: NATIVE) Console (/SUBSYSTEM: CONSOLE) Console (/SUBSYSTEM: CONSOLE)
Driver Driver (/Driver) Driver (/Driver) Not Set Not Set
Advanced
Option RTSSDebug RTSSRelease Debug Release
Entry Point _RtapiDllEntryCRT %408 _RtapiDllEntryCRT %408    
Randomized Base Address     Yes (/DYNAMICBASE) Yes (/DYNAMICBASE)
Target Machine MachineX86 (/MACHINE:X86) MachineX86 (/MACHINE:X86) MachineX86 (/MACHINE:X86) MachineX86 (/MACHINE:X86)
Section Alignment 32 32    
IntervalZero.com | Support | Give Feedback