Hi Tom,
C++ allows overload function names. We can have a function void dummy(void) as well as void dummy(int)
with the only difference being the parameters.
Thus, for proper linkage, the linker needs to know which from the two functions it should link.
The C++ compiler uses name mangling, it adds list of parameters into the function names, for example:
void __dummy_v (void);
void __dummy_i (int);
If you're in a *.c module and you try to call cplus_task defined in a *.cpp module, then due to C++ name mangling the extern function is not "cplus_task" but something like "__cplus_task_ui" or something like that. You should be able to see the name in disassemble listing of cplus.cpp.
What you can do is to have the TASK_TEMPLATE_STRUCT definition in a *.cpp file and refer to all C tasks via extern "C" {} keyword. That's exactly how you would use MQX API from a C++ source file.