hello,
I'm trying to make a variable (string to be exact) that I can read it's value from any file in my project.
I searched around and found that I can use "extern" to make an external variable, but I'm not sure how to declare it.
I've tried to put it in my viewcontroller.h file in this form:
But I got this error:
I'm trying to make a variable (string to be exact) that I can read it's value from any file in my project.
I searched around and found that I can use "extern" to make an external variable, but I'm not sure how to declare it.
I've tried to put it in my viewcontroller.h file in this form:
Code:
extern NSString *score;
But I got this error:
Code:
"_score", referenced from:
_score$non_lazy_ptr in TapsViewController.o
(maybe you meant: _score$non_lazy_ptr)
ld: symbol(s) not found
collect2: ld returned 1 exit status