Attempting to use the boost
library to create a system wide mutex from the docs
#include <boost/interprocess/sync/interprocess_mutex.hpp>
#include <boost/interprocess/sync/scoped_lock.hpp>
#include <boost/interprocess/sync/named_mutex.hpp>
using namespace boost::interprocess;
MutexType mtx;
int main()
{
return 0;
}
I am running visual studio code and compiling my code using msys2-MINGW64 environment like so g++ mutexes.cpp -lboost_system
but this does not seem to work and I am getting this error in the bash console
mutexes.cpp:8:1: error: 'MutexType' does not name a type
8 | MutexType mtx;
| ^~~~~~~~~