Using static mutex in a class Using static mutex in a class multithreading multithreading

Using static mutex in a class


You have declared, but not defined your class static mutex. Just add the line

boost::mutex MyClass::mx;

to the cpp file with the implementation of MyClass.