Hi,
I am using uVision4 for LPC3250.
I declare my class in my header file and define its functions in the corresponding cpp file.
My question is this, how can I reach the object of this class when I create it in another file.
For example, in a.cpp:
MyClass MyObject;
in b.cpp
MyBoject.value = 5;
I want my object to be global.
Thanks for your helps.
I wrote in b.cpp
extern MyClass MyObject;
when I use
MyObject.value = 5;
but I get the error "Undefined symbol MyObject (referred from b.o)"
and the project is not built.