GCC std::thread not found in namespace std

前端 未结 5 1542
梦如初夏
梦如初夏 2020-12-06 16:43

I am using GCC 4.5.0 with the Eclipse IDE (if that matters) on Windows via MinGW.

I\'m using the -std=c++0x flag.

I find that _GLIBCXX_HAS

5条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-06 17:22

    Works fine on Linux (g++ -std=c++0x -lpthread with no additional defines).

    However, this thread on Cygwin mailing list suggests that, at least as of 4.4, _GLIBCXX_HAS_GTHREADS was disabled by an autoconf test when building libstdc++ because pthread implementation of cygwin is missing pthread_mutex_timedlock. Perhaps MinGW has the same problem.

    Also, this thread on comp.lang.c++.moderated says the same thing. Not supported by the library.

提交回复
热议问题