Undefined reference to initialized static member variable with make_shared

Compiling with -std=c++14 the following code: #include <memory> class A { public: static constexpr int c = 0; std::shared_ptr<int> b; A() { b = std::make_shared<int> (c); } }; int main () { A a; return 0; } Gives a linker error "undefined reference to `A::c’", while using "A::c" in other contexts that are not "make_shared",… Read More Undefined reference to initialized static member variable with make_shared