RTMaps: how to create a new component in C++
This guide shows how to create a component for Intempora's RTMaps in C++.
The following software are needed:
- RTMaps from Intempora
- Microsoft Visual C++ Express from Microsoft
Microsoft Visual C++ Express is the light (and free) version of the C++ development environment. It does not support “add-ins” as in standard versions of Visual Studio. So, the RTMaps SDK Wizard cannot be integrated automatically in the Microsoft Visual C++ Express menus when installing RTMaps. However Intempora provides an external tool that can be integrated in the VC++ Express environment.
The following steps explain how to integrate the RTMaps tool into VC++ Express:
1. Start Microsoft Visual C++ Express 2015
2. Select menu Tools then External Tools…
3. Click on “Add” button.
4. For the new tool, the configuration is the following:
Title: RTMaps SDK Wizard
Command: C:\Program Files\Intempora\RTMaps 4\tools\rtmaps_sdk_wizard_vc2015.cmd
Arguments: $(SolutionDir)\$(SolutionFileName)
Check the “Use Output Window” option
click "Apply".
The installation of the RTMaps SDK Wizard is completed and it is possible to access the wizard from the Tools menu.
Note: Each time a new project or component is created in the RTMaps SDK with the wizard, the Visual C++ Solution file and/or Project files will be modified by the wizard. Visual C++ will detect that modification and suggest to Reload it. Just accept by clicking on the “Reload” button.
After install of the RTMaps SDK Wizard we can create a new package.
The steps to create new package in RTMaps are:
- in Microsoft Visual C++ Express 2015 select menu Tools then RTMaps SDK Wizard
- type 1 to create a new package
- enter the name of the package name
- click on the Reload button
- on the left side of the screen the new created package is shown
The next step is to create a new component.
To create a new component:
- in Microsoft Visual C++ Express 2015 select menu Tools then RTMaps SDK Wizard
- type 2 to create a new component
- type 2 to select the package previously created (ex. TestPackage)
- enter the name of the component, then press OK
The component will be automatically created and appears on the right side of the screen.
That's it. The RTMaps SDK Wizard automatically creates the C++ code for the component. This is a working code.
As a next step, we have to build it. To do that, right click on the component, than select Build.
At the bottom of the screen we can see the result of the build process. A file .pck is created.
Finally, as last step, we can load the generated .pck file into RTMaps.
The steps are:
- start RTMaps
- on the left side of the screen, change the path to the one where the .pck was created by the build process
- select the created .pck file
- right click on the file, than select load package
- the component appears in the list of registered components
- drag and drop it on the project to use it