Makefile errors

Hello everyone,

In PROS, when I compile my program, I receive a:
Description Resource Path Location Type
make: *** [bin/output.elf] Error 1 [snip] C/C++ Problem

Apparently this is an error occurring from the makefile of the project.

The only parts modified in this particular program are the init file and the opcontrol file. Here is opcontrol:


void operatorControl() {
	int j=0;
	while (j!=375) {
		motorSet(1, motors[0][j]);
		motorSet(2, motors[0][j]);
		motorSet(3, motors[1][j]);
		motorSet(4, motors[1][j]);
		j++;
	}
}

For various reasons I would rather not give away what I have in the init code at this time, except that it involves reading from a file.

What could be causing this error?

Thanks,
brep

Edit: Also, I am using a global array for this project if that helps at all.

I know what you’re doing :wink:

I can’t replicate your issue with the code given.

Try rebuilding the project (Clean then Build).

Side note - A for loop would be more appropriate for readability of the snippet:

for (int j = 0; j < 375; j++)
{
	motorSet(1, motors[0][j]);
	motorSet(2, motors[0][j]);
	motorSet(3, motors[1][j]);
	motorSet(4, motors[1][j]);
}

You either have an error (syntax) in the code, or are using (and therefore linking against) functions that don’t exist. Show us the code and we can help.

I’m sure you do, but I don’t want others knowing what I’m doing because that takes the entire fun out of programming and seeing the unique programming ideas that come up :wink: I’ll try out what you said. And jPearman, if I become desperate and can’t get the code to work, can I send you a pm? And you too edjubuh?

Yes you can send me a PM.

You will also need a delay in that loop, all 375 values will be sent to the motors almost instantly and the motors will just end up running at the last value sent.

Never mind, I was able to figure out the problem. It had to do with an array stored in a header file not working properly. The program is now fixed and works as intended.

Thank you guys anyway :slight_smile: