|
APIs, concepts, guides, and more
|
Learn how to run a sample app in C++.
On the menu bar, choose File -> New -> Project
.png)
On the new window, on the left, expand Installed, expand Templates, expand Other Languages, and then choose Console App (Visual C++)
.png)
Specify the Name and Solution Name for your project, then hit OK.
.png)
.png)
Choose the F5 key to run the project. A Command Prompt window appears that contains the line:
.png)
What files do I need to setup my C++ project?
➡️ 32-bit
rsi.h → Primary Header file
RapidCode.lib → [32bit] - Import Library
RapidCode.dll → [32bit] - C++ DLL
➡️ 64-bit
rsi.h → Primary Header file
RapidCode64.lib → [64bit] - Import Library
RapidCode64.dll → [64bit] - C++ DLL
Right-click the project in the solution explorer and select "Properties".
.png)
In the drop-down menu in the top left set the Configuration to "All Configurations"
.png)
In the General section set the Output Directory to the install location of Rapid Setup. In this case C:\RSI\8.1.5
.png)
In the C/C++ -> General section add the Rapid Setup install directory to the Additional Include Directories. Do not overwrite (AdditionalIncludeDirectories).
C:\RSI\8.1.5;%(AdditionalIncludeDirectories)
.png)
In the C/C++ -> Preprocessor add RSIAPP;Do not overwrite _<different options>_
.png)
In the Linker -> General section add the Rapid Setup install location and the Additional Library Directories to the install location of Rapid Setup.
C:\RSI\8.1.5;%(AdditionalLibraryDirectories)
.png)
In the Linker -> General section add RSIQVC64.lib for 64 bit and RSIQVC.lib for 32 bit
.png)
In Solution Explorer (open on View Tab or hit ctrl+alt+L) right click on the Source Files, then click on Add, then click on New Item .
.png)
Change the Name of your file to the name of the Sample App that you want to use and hit Add.
.png)
After you click Add, you will see an empty .cpp file. Paste the desired sample app into the file.
Right-click Header Files in the Solution Explorer. Then Add a New Item.
.png)
AbsoluteMotinMain();Include the new header file and a call to your sample app function in your main .cpp file.
#include "AbsoluteMotion.h"
AbsoluteMotionMain();
.png)
Paste the helper functions into this file.