- This topic has 0 replies, 1 voice, and was last updated 2 weeks, 2 days ago by .
Viewing 1 post (of 1 total)
Viewing 1 post (of 1 total)
- You must be logged in to reply to this topic.
(This message was transferred over from our old forum)
Posted August 18, 2015
By Todd DeBoer
[hr]
On 7/24/12 Jaybee sked, “I have created a few tasks which will run constantly in MyTask.c then I would like to delete some of these tasks in another c file example DeleteMyTask.c but I cant seem to be able to do that.
in MyTask.c I included:
T_uezTask G_xTask1;
and start the task:
UEZTaskCreate((T_uezTaskFunction)task1, “MyTask1″, 128, 0,
UEZ_PRIORITY_HIGH, &G_xTask1);
and the task starts to run forever.
Then in DeleteMyTask.c I add this line:
UEZTaskDelete(G_xTask1);
but I get an error saying G_xTask1 is undeclared, which is logical.
So i place it in my globalvariable.h file and it returns
Multiple redefinition of G_xTask1.
What must I do so I can create/delete a global task?”
[hr]
(Follow up post)
Answered:
Put T_uezTask G_xTask1 back into MyTask.c. Then add this line to DeleteMyTask.c:
extern T_uezTask G_xTask1;