PROS task not found in scope

I tried implementing a third task for a motion controller but I can’t get it to complied. I have constructed it identically to my other working task. The spelling is also the same between the constructor and function are the same and the only two mentions of “Targeting” in the file.

Here is the error the complier gives

src/main.cpp:60:20: error: ‘Targeting’ was not declared in this scope
60 | pros::Task Aim(Targeting);
|

The constructors

void initialize() {
	pros::lcd::initialize();
    pros::Task Aim(Targeting);
    pros::Task Tracking(odometery);
    	
}

Note the odometery task is intentionally misspelled to avoid potential confusion with other variables and it is the aforementioned working task.

I do not use PROS, although I program in C-sharp which I believe can help here. Could it be that when you called upon it in the code, you used a lowercase t?

I checked that one, the function name is the same as it appears in the constructor.

Where did you declare Targeting? If you declared it in a different file, did you include said file in the file with initialize?
If the compiler is telling you it’s not declared in the scope, that means that Targeting can’t be accessed by the initialize function.

Just fixed it, turns out the thread had to be before the constructor. It’s odd it did not require that of the other thread.

Thanks for the feedback.