Go Down

Topic: Compile problem (Read 719 times) previous topic - next topic

gufranco

Hi,

I'm having 6 problems when compiling my sketch.

http://pastebin.com/P3N6cHur

Errors:
timesharing:19: error: variable or field 'blink_red' declared void
timesharing:19: error: 'TaskManager' was not declared in this scope
timesharing:19: error: 'tm' was not declared in this scope
timesharing:20: error: variable or field 'blink_yellow' declared void
timesharing:20: error: 'TaskManager' was not declared in this scope
timesharing:20: error: 'tm' was not declared in this scope


Any sugestion? Help! :)

PaulS

Quote
Any sugestion?

Yes. This is not C#. You can, and should, have separate files for the class declaration and class implementation.

You should have a total of 5 files - Task.h, Task.cpp, TaskManager.h, TaskManager..cpp, and the sketch.

Then, the compiler will tell you line numbers within files that are a lot easier to understand.

When you define a callback function, you have to define the number and types of arguments that the function takes, and the type of return value that it returns. Your actual function then needs to have that same signature. You are not properly defining the callback function signature, so you actual functions do not match that signature.


Go Up