VCS Error help

I have attempted to make a very basic Tank Drive program but have ran in to the following error.

16:37:07 – error – In file included from cxx_entry.cpp:7:
…/vexv5/gcc/include\stdlib.h:20:10: fatal error: ‘machine/stdlib.h’ file not found
#include

Is there anyone that has experienced this error before. I have copied and pasted the code below

#include "robot-config.h"

vex::competition    Competition;


void pre_auton( void ) {
 
}

void autonomous( void ) {
  
}

void usercontrol( void ) {
  // User control code here, inside the loop
  
    while(true){
    //Tank Drive
    Frontleftwheel.spin(directionType::fwd,Controller1.Axis3.position(percentUnits::pct),velocityUnits::pct);   
    Backleftwheel.spin(directionType::fwd,Controller1.Axis3.position(percentUnits::pct),velocityUnits::pct);
    Frontrightwheel.spin(directionType::fwd,Controller1.Axis2.position(percentUnits::pct),velocityUnits::pct);   
    Backrightwheel.spin(directionType::fwd,Controller1.Axis2.position(percentUnits::pct),velocityUnits::pct);
    
   
    if(Controller1.ButtonL1.pressing())                 // Use L1 to Lift the Arm
    {
        Leftlift.spin(directionType::fwd,50,velocityUnits::pct);
        Rightlift.spin(directionType::fwd,50,velocityUnits::pct);
    }
    
    else if(Controller1.ButtonL2.pressing())            //Use L2 to Lower Arm
    {
        Leftlift.spin(directionType::rev,30,velocityUnits::pct);
        Rightlift.spin(directionType::rev,30,velocityUnits::pct); 
    }
    else                    // holds arm
    {
    Leftlift.stop(brakeType::hold)
    Rightlift.stop(brakeType::hold)
    }
     if(Controller1.ButtonR1.pressing())                 // suck it up
    {
        Leftintake.spin(directionType::fwd,50,velocityUnits::pct);
        RightIntake.spin(directionType::fwd,50,velocityUnits::pct);
    }
    
    else if(Controller1.ButtonR2.pressing())            //spit it out 
    {
        Leftintake.spin(directionType::rev,20,velocityUnits::pct);
        RightIntake.spin(directionType::rev,20,velocityUnits::pct); 
    }
    else                    // holds arm
    {Leftintake.stop(brakeType::hold)
    RightIntake.stop(brakeType::hold)
    
}
    vex::task::sleep(20); //Sleep the task for a short amount of time to prevent wasted resources. 
  }
}



int main() {
    
    //Run the pre-autonomous function. 
    pre_auton();
    
    //Set up callbacks for autonomous and driver control periods.
    Competition.autonomous( autonomous );
    Competition.drivercontrol( usercontrol );

    //Prevent main from exiting with an infinite loop.                        
    while(1) {
      vex::task::sleep(100);//Sleep the task for a short amount of time to prevent wasted resources.
    }    
       
}

I have not experienced something like this before. In the code you posted, you didn’t put a curly brace after the driver control void. You finish the last else statement, then you finish the while statement after the vex::task::sleep, and then you go straight to task main. That could be part of the problem. Also, when you post code in the forums, you can use syntax highlighting to make it easier to read. I put a link below about how to do so.

1 Like

Thank you @trontech569 for the reply! I have fixed the last curly bracket and the formatting on the post.

My program is still giving me the same error

Are you including something in the robot-config.h file? The error seems to be thinking that a file that you tried to include was not found. I could be wrong.

No we went through the setup from a new program. I have never tried to open other files.