Create an RTX64 project in Visual Studio

To create an RTX64 project in Visual Studio:

  1. Start Visual Studio.
  2. In Visual Studio, on the File menu, click New > Project.
  3. On the Create a new Project page, in the templates list, scroll down to find the RTX64 Application template and select it, and then click Next.
  4. In the Configure your new project page, in the Project name box, enter a name for this project and click Create. In this guide, we use "RT_Project_01" as our project name.
  5. NOTE:  If Visual Studio tells you it can't find RTX64 SDK, go to C:\Program Files\IntervalZero\KINGSTAR SDK\<Version Number>\VSExtensions. Double-click RTXProjectWizard.vsix to install the RTX64 templates.

  6. On the Create a RTX64 RTSS Application page, there are several options to select. You can change them to meet your needs. In this guide we use the default settings. When you're done, click Finish.
  7. In Solution Explorer, right-click the project name "RT_Project_01" and then click Properties.
  8. In the RT_Project_01 Property Pages dialog box, in the Configuration list, click All Configurations.
  9. In the left pane, expand the C/C++ list and click General.
  10. In the right area, in the Additional Include Directories box, after $(RTX64SDKDir4)include;, enter "$(KINGSTARSDKDir4)include;" without space.
  11. The complete string is $(RTX64SDKDir4)include;$(KINGSTARSDKDir4)include;%(AdditionalIncludeDirectories).

  12. In the left pane, expand the Linker list and click General.
  13. In the Configuration list, make sure it is All Configurations. In the right area, in the Additional Library Directories box, after $(RTX64SDKDir4)lib\$(Rtx64Platform);, enter "$(KINGSTARSDKDir4)lib\amd64;" without space.
  14. The complete string is $(RTX64SDKDir4)lib\$(Rtx64Platform);$(KINGSTARSDKDir4)lib\amd64;%(AdditionalLibraryDirectories).

  15. In the left pane, in the Linker list, click Input.
  16. In the right area, in the Additional Dependencies box, enter the following strings depending on the build target:
  17. RtssDebug

    RtssRelease

    Debug

    Release

  18. After you finish adding the paths, click Apply and click OK.
  19. In Solution Explorer, in Header Files, double-click RT_Project_01.h to open it.
  20. Under #endif // UNDER_RTSS, enter the following code:
  21. #include <ksapi.h>
    #include <ksmotion.h>

  22. In the toolbar, click IntervalZero Real-Time Debugger to test the build. If it's successful, the application will run and exit.
  23. NOTE:  If the project doesn't run, in Solution Explorer, right-click RT_Project_01 and click Unload Project. Next, right-click RT_Project_01 (unloaded) and click Reload Project. Run the project again.