Using the RTFW Library in a C/C++ Project
The wRTOS Configuration and Control (RTFW) library (RtfwApi.dll) is a native DLL that allows C/C++ applications to configure and control the wRTOS Subsystem programmatically. This interface provides similar functionality to the Managed library.
To use the RTFW library in a C/C++ project, you must first perform a few modifications to the project settings. This topic lists the necessary changes.
To use the RTFW in a C/C++ project:
- In Visual Studio, add these #include directives to the project’s source code:
- Open the Property Pages for the project.
- Set Configuration to All Configurations and set Platform to All Platforms, and then do the following:
#include <windows.h>
#include <RtfwApi.h>
Component-specific #include directives:
|
Component |
#include directive |
|---|---|
|
Network Link Layer (NL2) |
#include <Rtfwnl2Api.h> |
|
TCP/IP |
#include <RtfwtcpipApi.h> |
|
E-CAT |
#include <RtfwecatApi.h> |
|
Network Relay |
#include <RtfwrlyApi.h> |
- Under C/C++ > General > Additional Include Directories, add:
$(wRTOSSDKDir1)include
- Under Linker > Input, add:
RtfwApi.lib
Component-specific libraries:
|
Component |
Library |
|---|---|
|
Network Link Layer (NL2) |
Rtfwnl2Api.lib |
|
TCP/IP |
RtfwtcpipApi.lib |
|
E-CAT |
RtfwecatApi.lib |
|
Network Relay |
RtfwrlyApi.lib |
- Set Platform to x64, and then do the following:
- Under Linker > General > Additional Library Directories, add:
$(wRTOSSDKDir1)lib\amd64
- Set Platform to x32, and then do the following:
- Under Linker > General > Additional Library Directories, add:
$(wRTOSSDKDir1)lib\x86
- Select OK and then rebuild the project.
Related Topics:
- Configuration and Control (RTFW) API Reference
- Supported Visual Studio Versions
- Supported .NET Versions
- Setting up Visual Studio for wRTOS Templates
- Using the wRTOS Application Template
- Using the wRTOS RTDLL Template
- Compiler and Linker Options
- Using wRTOS Code Snippets in Visual Studio
- Building a 32-bit User Space Application
- Visual Studio C Runtime Support
- Creating a Managed Code Application