Extern Variable linkage error
in my Qt project i have a QString variable in one class(variable is gloablly defined in dialog1.cpp)
QString d;
i am trying to access the same variable from another class (variable is declared as extern in timeall.cpp)
extern QString d;
Wen i compile the file, there appears to be a linker error
collect2: ld returned 1 exit status
Re: Extern Variable linkage error
can you please post the actual error message.
Re: Extern Variable linkage error
here is the compile output
collect2: ld returned 1 exit status
make: Leaving directory `/root/Desktop/deep (copy)'
make: *** [UNI] Error 1
Exited with code 2.
Error while building project UNI
When executing build step 'Make'
Re: Extern Variable linkage error
Quote:
in my Qt project i have a QString variable in one class(variable is gloablly defined in dialog1.cpp)
QString d;
Can you show the code surrounding this declaration?