Project

General

Profile

WResource.h - recursive_mutex is not a member of std

Added by Heiner Bensemer almost 4 years ago

Hi at all,

i am new here. A friend did show me Witty WT-WebToolkit and i found out that it is very interessting and played with some examples and created my first little project now.

My environment is:

Windows 7 (64)

Codelite IDE

MinGw64

Boost 1.7.2 (64)

WT 4.3.1

I did the following Codelite IDE settings:

C Compiler options:

-std=c++0x

-std=c++11

-std=c++14

-std=c++17

Compiler Include Paths:

.

C:\Dev\MinGW64\lib\gcc\x86_64-w64-mingw32\8.1.0\include\c\bits

C:\Dev\MinGW64\lib\gcc\x86_64-w64-mingw32\8.1.0\include

C:\Dev\MinGW64\x86_64-w64-mingw32\include

C:\Dev\MinGW64\include

C:\Dev\wt\4.3.1\include

C:\Dev\wt\4.3.1\include\wt

C:\Dev\curl\include\curl

C:\Dev\boost

Linker Libraries search Path:

C:\Dev\wt\4.3.1\lib

C:\Dev\boost\lib64-msvc-10.0

C:\Dev\MinGW64\lib

C:\Dev\MinGW64\x86_64-w64-mingw32\lib

Linker Libraries:

wt

wthttp

wtdbo

wtdbosqlite3

wtdbopostgres

wttest

boost_context

boost_chrono

boost_date_time

boost_filesystem

boost_graph

boost_iostreams

boost_locale

boost_math_c99

boost_math_c99f

boost_math_c99l

boost_math_tr1

boost_prg_exec_monitor

boost_program_options

boost_random

boost_regex

boost_serialization

boost_system

boost_thread

boost_timer

boost_unit_test_framework

boost_wave

boost_wserialization

In my main.h i did include all needed WT-Headers even WResource.h, but if i compile i get the following error:

C:\Dev\wt\4.3.1\include/Wt/WResource.h:439:24: error: 'recursive_mutex' is not a member of 'std'
  439 |   std::shared_ptr<std::recursive_mutex> mutex_;
      |                        ^~~~~~~~~~~~~~~
C:\Dev\wt\4.3.1\include/Wt/WResource.h:17:1: note: 'std::recursive_mutex' is defined in header '<mutex>'; did you forget to '#include <mutex>'?
   16 | #include <condition_variable>
  +++ |+#include <mutex>
   17 | #ifdef WT_THREADED
C:\Dev\wt\4.3.1\include/Wt/WResource.h:439:24: error: 'recursive_mutex' is not a member of 'std'
  439 |   std::shared_ptr<std::recursive_mutex> mutex_;
      |                        ^~~~~~~~~~~~~~~
C:\Dev\wt\4.3.1\include/Wt/WResource.h:439:24: note: 'std::recursive_mutex' is defined in header '<mutex>'; did you forget to '#include <mutex>'?
C:\Dev\wt\4.3.1\include/Wt/WResource.h:439:39: error: template argument 1 is invalid
  439 |   std::shared_ptr<std::recursive_mutex> mutex_;
      |                                       ^
C:\Dev\wt\4.3.1\include/Wt/WResource.h:442:8: error: 'condition_variable_any' in namespace 'std' does not name a type
  442 |   std::condition_variable_any useDone_;
      |        ^~~~~~~~~~~~~~~~~~~~~~
C:\Dev\wt\4.3.1\include/Wt/WResource.h:17:1: note: 'std::condition_variable_any' is defined in header '<condition_variable>'; did you forget to '#include <condition_variable>'?
   16 | #include <condition_variable>
  +++ |+#include <condition_variable>
   17 | #ifdef WT_THREADED
In file included from C:\Dev\wt\4.3.1\include/Wt/Http/Response.h:12,

...

Any idea what is wrong/missing here or in my configuration?

Thanks in advance for any help.

Bensemer