Hey guys, I'm getting this kinda vague error:

Zeal\src\window.cpp|19|error: cannot declare member function `static unsigned int zeal::window::getWindowCount()' to have static linkage|

With the following code (only what I think is needed, if you need more please do ask)


namespace zeal {
class window : public element
    static unsigned int getWindowCount();

    static unsigned int windowCount;


unsigned int zeal::window::windowCount = 0;

namespace zeal {
    static unsigned int window::getWindowCount(){
        return windowCount;

It's only called once from main, I want to call it like this:

main.cpp (one line only)

cout << "Nr of windows: " << window::getWindowCount() << endl;

Any help is much appreciated as usual,

Don't repeat the static keyword in the definition of getWindowCount.

D'oh! I thought I'd already done tried that. Thanks. :)