My team was invited to an off season rookie competition, but we decided that our old robot was going to be strip for parts. As a result, we might not have a physical robot to deploy and test our code in the future.
I decided to test out the simulation feature as a alternative. To do so, I first used the official SimpleDifferentialDriveSimulation example here on GitHub.
I look up so tutorial online, and I saw a command in command palette call Simulate Robot code on Desktop as seen in this picture https://github.com/wpilibsuite/allwpilib/tree/main/wpilibcExamples/src/main/cpp/examples/SimpleDifferentialDriveSimulation
. But in my case, I only saw the command Simulate Robot Code as seen in this photo
* Executing task: gradlew simulateExternalNativeDebug -Dorg.gradle.java.home="C:\Users\Public\wpilib\2023\jdk"
> Task :compileFrcUserProgramWindowsx86-64DebugExecutableFrcUserProgramCpp FAILED
g++.exe: fatal error: cannot specify '-o' with '-c', '-S' or '-E' with multiple files
compilation terminated.
g++.exe: fatal error: cannot specify '-o' with '-c', '-S' or '-E' with multiple files
compilation terminated.
Compilation Error!
GradleRIO detected this build failed due to a Compile Error (compileFrcUserProgram).
Check that all your files are saved, then scroll up in this log for more information.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileFrcUserProgramWindowsx86-64DebugExecutableFrcUserProgramCpp'.
> Multiple build operations failed.
C++ compiler failed while compiling Drivetrain.cpp.
C++ compiler failed while compiling Robot.cpp.
See the complete log at: file:///C:/Users/dannyk/Desktop/main/Drive%20chain%20sim%20demo/build/tmp/compileFrcUserProgramWindowsx86-64DebugExecutableFrcUserProgramCpp/output.txt
> C++ compiler failed while compiling Drivetrain.cpp.
> C++ compiler failed while compiling Robot.cpp.
* 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 3s
1 actionable task: 1 executed
The command Hardware Sim Robot Code doesn’t work either. I got the same error.