I get a warning by the linker when using static variables in a c++ class:
dsp_app.cpp: Warning: Undefined reference to '_ZN7Counter5countE'
Code: Select all
class Counter { 
public:
    static unsigned count;
    Counter() { count++; }
};
void test() {
    Counter c;
    debug_printf("count %d\n", c.count );
}
this is not a template class requiring some specialisation
any suggestion ??
Thank you !
fabriceo



