Help with programming PROS

I occupy help with the topic of programming in PROS (I am a novice in the subject) at the time of using “prosv5 make” the terminal sends error ; “The term ‘prosv5’ is not recognized as the name of a cmdlet” because and how I can resolve it. if you could help me I would appreciate them

Hello, and welcome to the forums! From the error messgae, I assume you’re using Windows? If so, I also assume that you are using Visual Studio Code?

If all of that is correct, I recommend first taking a good look at the PROS setup guide to double check if your solution lies there. Otherwise, downloading the PROS installer package should also do the trick.

2 Likes

If you installed PROS with the VSCode extension, be sure you are using the PROS Integrated Terminal in VSCode to run these commands. You can access said terminal by clicking the “Integrated Terminal” button in the PROS sidebar.

1 Like

thanks, if it worked for me but now when using " prosv5 make" the error “C:\Users\axelf\Documents\Programacion PROS is not inside a PROS project. Execute this command from within a PROS project or specify it with --project project/path” what do I do now?

If you look at the file system sidebar, you can see that you are currently in the folder called “Programacion PROS”, not the actual project which is called “my-pros-project”. Do File → Open Folder → choose “my-pros-project”. This folder is your actual PROS project, and needs to be open for the commands to work.

Since this is a common mistake people are making, we will add something to help this issue in the next VSCode update.

2 Likes

thank you very much, if it worked for me, only now I have a little problem. At the moment that I use “prosv5 make” another error arises xdd

“ERROR - pros.cli.build:make - Failed to make project: Exit Code 2”

because of this it does not allow me to update the code as such

It would appear you have a linker error (you are doing something wrong with having multiple files). From the limited code I can see, you have undefined references to all of your devices (left2, left3, Right1, Right2, Right3). You can either look into this yourself, or provide more of your code so that others can help you. This is user error, not an issue with PROS.

this is all the code, it is something basic but do not expect much I am new in PROS and it is only for a test chassis to 6 engines

Uploading: image.png…




1 Like

Yeah…. This is not how you use header files properly. Going to give a brief example and hopefully you can transfer this example to your entire project

my_file.h

#IFNDEF MY_FILE_H
#DEFINE MY_FILE_H

extern int my_global_int; // declare a variable that is global throughout files

void my_function(); // declare a function that is global throughout files

#endif

my_file.cpp

#include “my_file.h”
int my_global_int = 15; // define a variable that is global throughout files

void my_function() {
// your function’s code here
}
// define a function that is global throughout files

main.cpp

#include “my_file.h”
#include “main.h”

// we can now use “my_global_int” and “my_function” in this file

Please note: I typed this out on my phone so it may not be correct

2 Likes