#define OGRE_WQ_MUTEX(name) mutable std::recursive_mutex name 

Taken from the OGRE3d engine code, the compiler produces an error:

". \ OGRE \ include \ OGRE / Threading / OgreThreadDefinesSTD.h: 40: 42: error:
'recursive_mutex' in namespace 'std' does not name a type "

I compile via makefile. UPD: Makefile:

 CXX = g++ CXXFLAGS = -static-libgcc -static-libstdc++ -O2 -g -c -w -fmessage-length=0 -std=c++17 -fpermissive LDFLAGS= --static SOURCES = main.cpp #LIBS = -l.\lib\OgreOverlay.lib -l.\lib\OgreMain.lib -l.\lib\OgreBites.lib LIBS_PATH = \ .\OGRE\lib\ .\OGRE\lib\OGRE\ .\OGRE\lib\OGRE\Samples\ INC_PATHS = \ .\OGRE\include\OGRE\ .\OGRE\include\OGRE\Bites\ .\OGRE\include\OGRE\HLMS\ .\OGRE\include\OGRE\MeshLodGenerator\ .\OGRE\include\OGRE\Overlay\ .\OGRE\include\OGRE\Paging\ .\OGRE\include\OGRE\Plugins\BSPSceneManager\ .\OGRE\include\OGRE\Plugins\OctreeSceneManager\ .\OGRE\include\OGRE\Plugins\OctreeZone\ .\OGRE\include\OGRE\Plugins\ParticleFX\ .\OGRE\include\OGRE\Plugins\PCZSceneManager\ .\OGRE\include\OGRE\Plugins\STBICodec\ .\OGRE\include\OGRE\Property\ .\OGRE\include\OGRE\RenderSystems\ .\OGRE\include\OGRE\RTShaderSystem\ .\OGRE\include\OGRE\Terrain\ .\OGRE\include\OGRE\Threading\ .\OGRE\include\OGRE\Volume\ TARGET = ogre_1.exe all: $(TARGET) $(TARGET): $(CXX) $(LDFLAGS) $(SOURCES) -o $(TARGET) $(LIBS) $(foreach dir,$(INC_PATHS),-I$(dir)) -I. clean: del /F $(TARGET) 
  • one
    Does the compiler support him exactly? ... - Harry
  • one
    Is there a #include <mutex> ? -std=c++11 or higher? - AnT
  • Everything is there, the latest compiler and standard is Artem Bakaiev
  • 2
    The last one is what? See how to give a minimal reproducible example . - αλεχολυτ

0