I\'m using Qt 4.7 and Cmake 2.8.3 with g++ 4.2.1 on Mac OS X.
I\'m getting a bizarre linker error when using static or global variables in one of my files. Here\'s t
You need to define the static variable in cpp file and not in header file. If you define it in header file, every cpp file which includes this header will get its own copy hence linker complains about duplicate symbols.
Static data members must be explicitly defined in exactly one compilation unit
See this link: http://www.parashift.com/c++-faq-lite/ctors.html#faq-10.12