Tutorial 6-1: Configuring a new C++ project
The steps to configure a C++ project that uses the RTX SDK is mostly the same as the steps to configure a Windows project as detailed in Tutorial 1-1: Configuring a new C++ project . The main differences are:
The RTX64 Application project template should be used.
IMDll_RT.lib should be linked instead of IMDll.lib.
The Stack Commit Size and Stack Reserve Size project properties must be configured.
There is no need to copy IMDll.dll.
Create a Visual C++ RTSS project in Microsoft Visual Studio by selecting the RTX64 Application template (or RTX Application for 32-bit).

Select the appropriate settings in the application wizard. Here, the default settings were selected.
The project configurations should be automatically set appropriately when the project is created. To verify this, open the Configuration Manager by selecting Configuration Manager under the Build menu. The “Active solution configuration” can be set to “RtssRelease” or “RtssDebug” (or another configuration of any chosen name) and the “Active solution platform” should be set to x64 for 64-bit applications and Win32 for 32-bit applications.

Open the project property pages by selecting …Properties under the Project menu. Navigate to “Configuration Properties\C/C++\General”.

Click on the arrow next to “Additional Include Directories”, then select “Edit…”. In the dialog that appears, add the Include folder in the WMX3 installation directory (“C:\Program Files\SoftServo\WMX3\Include” by default).

Navigate to “Configuration Properties\Linker\General”. Click on the arrow next to “Additional Library Directories”, then select “Edit…”. In the dialog that appears, add the Lib folder in the WMX3 installation directory (“C:\Program Files\SoftServo\WMX3\Lib” by default).

Navigate to “Configuration Properties\Linker\Input”. Click on the arrow next to “Additional Dependencies”, then select “Edit…”. In the dialog that appears, add the following libraries:
AdvancedMotionApi.lib
ApiBufferApi.lib
CompensationApi.lib
CoreMotionApi.lib
CyclicBufferApi.lib
EventApi.lib
IMDll_RT.lib
IOApi.lib
LogApi.lib
UserMemoryApi.lib
WMX3Api.lib
Verify that IMDll_RT.lib was added and not IMDll.lib.
If you are using Visual Studio 2015 or later, also add the following libraries to this list (see Note regarding Visual Studio 2015 and beyond):
legacy_stdio_definitions.lib
legacy_stdio_wide_specifiers.lib

Except for IMDll_RT.lib and WMX3Api.lib, these libraries are optional and may be omitted if the functions contained will not be used by the application.
Navigate to “Configuration Properties\Linker\System”. Change the values of “Stack Reserve Size” and “Stack Commit Size” to at least 1048576 (1MB). The recommended value is at least 8388608 (8MB). If these values are too small, the stack may overflow when a WMX3 function is called, causing the application to generate an exception.

If you are using Visual Studio 2022 v17.7.3 or later, you may experience linker errors due to the use of SRW locks that are not supported by the linker RTX unless you disable the thread-safe initialization option. (see Note regarding Visual Studio 2022 and beyond)
In this case, you need to add a following option to “Configuration Properties\C/C++\Command Line”.
/Zc:threadSafeInit-

Close the project property pages.
The parts of the C++ application that will use the WMX3 libraries must include the header files corresponding to the libraries that will be used by the application. Here, the file containing the main routine include the following header files:
#include "AdvancedMotionApi.h"
#include "ApiBufferApi.h"
#include "CompensationApi.h"
#include "CoreMotionApi.h"
#include "CyclicBufferApi.h"
#include "EventApi.h"
#include "IOApi.h"
#include "LogApi.h"
#include "UserMemoryApi.h"
#include "WMX3Api.h"
This concludes the configuration of the C++ RTSS project.