Code Error Glitch

I was trying to download code from V5 but it wouldn’t download. It also didn’t show an error message on the error console section things. It shows no error but when I tried to build it, instead of downloading it to the robot, it shows this error. It is very cryptic and I think it is a glitch where this is supposed to show up on the error console but it doesn’t.

Can someone interpret what this is saying? If you want, I can show my code

unix build for platform vexv5 on Darwin x86_64

CXX src/main.cpp

LINK build/SKILLSdfxvgfc.elf

/Applications/VEXcode V5.app/Contents/Resources/sdk/vexv5/libv5rt.a(v5_startup.c.obj): In function vexMain': (.text.vexMain+0xa0): undefined reference to main’

/Applications/VEXcode V5.app/Contents/Resources/sdk/vexv5/libv5rt.a(vex_task.cpp.obj): In function vex::task::_stopAll()': (.text._ZN3vex4task8_stopAllEv+0x34): undefined reference to main’

/Applications/VEXcode V5.app/Contents/Resources/sdk/vexv5/libv5rt.a(vex_competition.cpp.obj): In function vex::competition::competition()': (.text._ZN3vex11competitionC2Ev+0x134): undefined reference to main’

make: *** [build/SKILLSdfxvgfc.elf] Error 1

make process closed with exit code : 2

Can you post your code? Based on the error it’s likely that sometimes is wrong with your main function.

1 Like

Yea of course and I will edit the question

#pragma region VEXcode Generated Robot Configuration
// Make sure all required headers are included.
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <math.h>
#include <string.h>


#include "vex.h"

using namespace vex;

// Brain should be defined by default
brain Brain;


// START V5 MACROS
#define waitUntil(condition)                                                   \
  do {                                                                         \
    wait(5, msec);                                                             \
  } while (!(condition))

#define repeat(iterations)                                                     \
  for (int iterator = 0; iterator < iterations; iterator++)
// END V5 MACROS


// Robot configuration code.
controller Controller1 = controller(primary);
motor leftMotorA = motor(PORT15, ratio18_1, false);
motor leftMotorB = motor(PORT16, ratio18_1, false);
motor_group LeftDriveSmart = motor_group(leftMotorA, leftMotorB);
motor rightMotorA = motor(PORT17, ratio18_1, true);
motor rightMotorB = motor(PORT19, ratio18_1, true);
motor_group RightDriveSmart = motor_group(rightMotorA, rightMotorB);
drivetrain Drivetrain = drivetrain(LeftDriveSmart, RightDriveSmart, 319.19, 295, 40, mm, 1);

motor MAINFLYWHEEL = motor(PORT2, ratio6_1, false);

digital_out DigitalOutC = digital_out(Brain.ThreeWirePort.C);
digital_out DigitalOutB = digital_out(Brain.ThreeWirePort.B);
motor INTAKE1 = motor(PORT4, ratio18_1, false);

motor INTAKE2 = motor(PORT5, ratio18_1, true);

motor ROLLERLOL = motor(PORT7, ratio36_1, false);

optical OpticalSeNoR = optical(PORT11);
inertial InertialTHING = inertial(PORT8);

rotation LEFTROT = rotation(PORT20, false);

rotation RIGHTROT = rotation(PORT18, false);




// define variable for remote controller enable/disable
bool RemoteControlCodeEnabled = true;
#pragma endregion VEXcode Generated Robot Configuration



































//PROPER CODE STARTS HERE

//______________________________
//______________________________
//______________________________
//______________________________
//______________________________
//______________________________
//______________________________
//______________________________
//______________________________




// Include the V5 Library
#include "vex.h"
  
// Allows for easier use of the VEX Library
using namespace vex;








competition Competition;

float myVariable, TIME_BETWEEN_INNOUT;

event message1 = event();
event Mediumback = event();
event mediumforward = event();
event Slowforward = event();
event Slowbackward = event();
event Mediumright = event();
event Mediumleft = event();
event Slowright = event();
event Slowleft = event();
event endgame = event();
event ROLLER = event();
event colors = event();
















































// "when autonomous" hat block
int onauton_autonomous_0() {
  OpticalSeNoR.setLight(ledState::on);
  InertialTHING.startCalibration();
  while (InertialTHING.isCalibrating()) { task::sleep(50); }
  wait(0.85, seconds);
  OpticalSeNoR.setLightPower(100.0, percent);
  ROLLERLOL.setVelocity(100.0, percent);
  Drivetrain.setTurnVelocity(5, percent);
  Drivetrain.setDriveVelocity(10, percent);
  Drivetrain.drive(forward);
  Drivetrain.setStopping(brake);

  repeat(425) {
    
        
    //try replacing with while (!(!Optical12.color() == red)) {

    //CHECKING TO SPIN
    
    if (OpticalSeNoR.color() == red || OpticalSeNoR.color() == orange) {
      
      ROLLERLOL.spin(reverse);
    
    }
    else {
      
      ROLLERLOL.stop();

    }
    wait(5, msec);
  }
  

  //Getting ready to shot


  Drivetrain.stop();
  ROLLERLOL.stop();
  Drivetrain.setDriveVelocity(10.0, percent);
  Drivetrain.driveFor(reverse, 12, inches, true);
  Drivetrain.driveFor(forward,5,inches,true);
  Drivetrain.setTurnVelocity(50,percent);
  INTAKE1.setVelocity(100,percent);
  INTAKE2.setVelocity(100,percent);
  INTAKE1.spin(forward);
  INTAKE2.spin(forward);
  Drivetrain.turnFor(right,180,degrees,true);
  Drivetrain.setDriveVelocity(10,percent);
  Drivetrain.driveFor(forward,15.45,inches,true);
  

  




  

  //Calibrating INERTIAL Thing done above

  Drivetrain.setTurnVelocity(10,percent);
  Drivetrain.turn(left);
  while (true) {
    if (InertialTHING.heading(degrees) > 91 && 91.4 > InertialTHING.heading(degrees)) {
      Drivetrain.stop();
      Drivetrain.driveFor(forward,7,inches,true);
      Drivetrain.setDriveVelocity(7,percent);
      INTAKE1.stop();
      INTAKE2.stop();
      Drivetrain.drive(forward);
      wait(2.5,seconds);
      
      repeat(425) {
        

        //try replacing with while (!(!Optical12.color() == red)) {

        //CHECKING TO SPIN
        
        if (OpticalSeNoR.color() == red || OpticalSeNoR.color() == orange) {
          
          ROLLERLOL.spin(forward);
        
        }
        else {
          
          ROLLERLOL.stop();
          Drivetrain.stop();

        }
        wait(5, msec);
      }

      Drivetrain.stop();
      ROLLERLOL.stop();
      //MAINFLYWHEEL.spin(reverse, 9.5, volt);
      Drivetrain.setDriveVelocity(50,percent);
      Drivetrain.driveFor(reverse,50,inches,true);
      Drivetrain.turn(right);


      






      if (InertialTHING.heading(degrees) > 105 && 105.4 > InertialTHING.heading(degrees)) {
      
        //Shooting the preloads
        wait(4, seconds);
        ROLLERLOL.stop();
        DigitalOutB.set(true);
        wait(0.3, seconds);
        DigitalOutB.set(false);
        wait(4.3, seconds);
        DigitalOutB.set(true);
        wait(0.3, seconds);
        DigitalOutB.set(false);
        wait(2.9, seconds);
        DigitalOutB.set(true);
        wait(0.3, seconds);
        DigitalOutB.set(false);
        //MAINFLYWHEEL.stop();
      }

          







        Drivetrain.setDriveVelocity(5,percent);
   
        Drivetrain.driveFor(reverse,10.2,inches);
      
        Drivetrain.turnFor(right,90,degrees);
        Drivetrain.driveFor(reverse,11,inches,true);
        Drivetrain.turnFor(right, 50,degrees);
        DigitalOutC.set(true);
        wait(3,seconds);
        DigitalOutC.set(false);            
        Drivetrain.driveFor(forward,5,inches,true);

          







    }


  }

        
      
}

edit: code tags added by mods, please remember to use them

NVM, I don’t know how you edit the original question

nvm, I fixed, turned out the main was deleted. Ooops