Other Software Development
Topic: Compile problem
(Read 747 times)
Dec 01, 2011, 02:50 pm
I'm having 6 problems when compiling my sketch.
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!
Seattle, WA USA
Re: Compile problem
Dec 02, 2011, 02:37 am
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.