Hello to all! Respect to all :)
Please, help me with a question.
I’m trying to compile library from sources with ‘extern’ construction:
A.cpp
int A = 5;
B.cpp
extern int A;
void foo()
{ A=10; }
But got an error: undefined reference to ‘A’ from ‘foo()’. Both files are added to project. What it can be?
Thanks!
↧