std::thread error (thread not member of std)

后端 未结 3 1276
盖世英雄少女心
盖世英雄少女心 2020-12-03 04:47

I compiled & installed gcc4.4 using macports.

When I try to compile using -> g++ -g -Wall -ansi -pthread -std=c++0x main.cpp...:

 #include 

        
3条回答
  •  囚心锁ツ
    2020-12-03 05:16

    Drop -ansi, it means -std=c++98, which you obviously don't want. It also causes macro __STRICT_ANSI__ to be defined and this may change the behavior of the headers, e.g. by disabling C++0x support.

提交回复
热议问题