Romi and C++

Does the Romi bot work with C++? Is it intended to? The RomiReference example project works fine for me in Java.

The C++ version (whether deploy robot code, simulate code on desktop) dumps screenfuls of errors, starting with:

C:\Users\npodr.gradle\caches\transforms-2\files-2.1\c8a90f4e34412eb91233d26a46d5e20f\wpilibc-cpp-2021.1.2-headers\frc/Watchdog.h(53): error C2061: syntax error: identifier ‘Watchdog’

It looks like that error is coming from the full desktop Visual Studio compiler. What version of Visual Studio (full, not vs code) do you have installed. For the Romi setup to work, you need the latest update for Visual Studio 2019. Older versions will not work.

1 Like

I just updated Visual Studio 2017 to Visual Studio 2019. Problem solved!

Thanks so much!

1 Like

To clarify, is Visual Studio 2019 required for Romi/C++ to work at all? Or is it only required if there are earlier Visual Studio versions already present?

I just tried running RomiReference (with “Enable Desktop Support” checked) on a machine that had no Visual Studio at all, but did have all the VSCode stuff. I got the errors below. After installing Visual Studio they went away:

Executing task: gradlew build generateVsCodeConfig -Dorg.gradle.java.home=“C:\Users\Public\wpilib\2021\jdk” <

Configure project :
INFO: Could not find files for the given pattern(s).

Task :assemble FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:assemble’.

No buildable binaries found:
- executable ‘frcUserProgram:debug:executable’:
- No tool chain is available to build for platform ‘windowsx86-64’:
- Tool chain ‘visualCpp’ (Visual Studio):
- Could not locate a Visual Studio installation, using the command line tool, Windows registry or system path.
- Tool chain ‘gcc’ (GNU GCC):
- Could not find C compiler ‘gcc’ in system path.
- Tool chain ‘clang’ (Clang):
- Could not find C compiler ‘clang’ in system path.
- Tool chain ‘roborioGcc’ (RoboRioGcc):
- Don’t know how to build for platform ‘windowsx86-64’.
- executable ‘frcUserProgram:release:executable’:
- No tool chain is available to build for platform ‘windowsx86-64’:
- Tool chain ‘visualCpp’ (Visual Studio):
- Could not locate a Visual Studio installation, using the command line tool, Windows registry or system path.
- Tool chain ‘gcc’ (GNU GCC):
- Could not find C compiler ‘gcc’ in system path.
- Tool chain ‘clang’ (Clang):
- Could not find C compiler ‘clang’ in system path.
- Tool chain ‘roborioGcc’ (RoboRioGcc):
- Don’t know how to build for platform ‘windowsx86-64’.

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 9s
1 actionable task: 1 executed
The terminal process “cmd.exe /d /c gradlew build generateVsCodeConfig -Dorg.gradle.java.home=“C:\Users\Public\wpilib\2021\jdk”” terminated with exit code: 1.

Terminal will be reused by tasks, press any key to close it.

Yes. Romi C++ code runs on the desktop, meaning that a supported desktop C++ compiler (Visual Studio 2019 on Windows) is required.

And the documentation has been updated to call that out.

2 Likes

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.