We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
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 think the OP has a typo somewhere.
Are you sure that the linker will process a file that contains:
Ant that this line isn't inside a namespace or contains the "static" keyword?
Have you checked your spellings?
And you are sure you are not using some clever #defines that changes what the compilers sees from what you see?
And you are sending the relevant object file to the linker?