Openframeworks 0.9.0 does not work with CLR?

I started to migrate to OF 0.9.0, but such trouble happened:

C1189	#error:  <mutex> is not supported when compiling with /clr or /clr:pure. (компилируется исходный файл src\main.cpp)

Now OF is not compatible with CLR due to the use mutex?

what is clr?

1 Like

(was curious myself)

mutex is part of the standard library since c++11 and we use it now in a couple of places so unless visual studio updates the CLR to work with that it won’t be compatible.

googling a bit it seems that you can enable clr per file so if you manage to include only parts that don’t use classes like mutex that can be conflicting you can use clr on those files.

another option is to try switching all appearances of std::mutex to Poco::mutex or some similar mutex class but it’s used now in quite a few places.

Just curious, does CLR compatibility mean you could use any CLR language like C#?

No, I meant that cannot use C++/CLI because the CLR does not support mutexes in C++.