Original Post
Why does the linker in Linux give "undefined reference" for static class function declared in an external library? libA.a: class SomeClass { public: static void StaticFunc(); }; void SomeClass::StaticFunc() {} exe: int main() { SomeClass::StaticFunc(); } "undefined reference to 'SomeClass:StaticFunc' Even if I put the class under some namespace, them same problem occurs. I'm using g++ to compile both by the way.