0

私のホストOSは次のとおりです。

Fedora 22 x64

gcc-g++ のバージョンは次のとおりです。

5.1.1

Eclipse CDT バージョン:

Eclipse CDT Mars Release V4.5.0

ここに私の簡単なデモコードリストがあります:

#include <thread>
void func(){}

int main(int argc, char** argv)
{
    std::thread ts(func);
    ts.join();
    return 0;
}

これは私のcdt構成です(間違った構成):

Project Properties->C/C++Build->Tool Chain Editor->(use Linux GCC as current)
Project Properties->C/C++Build->Settings->GCC C++ Compiler->Dialet->(ISO C++11)
Project Properties->C/C++Build->Settings->GCC C Compiler->Dialet->(ISO C11)
Project Properties->C/C++Build->Settings->GCC C++ Linker->(add pthread)

Project Properties->C/C++General->Paths and Symbols->Symbols
->add '__GXX_EXPERIMENTAL_CXX0X__' to GNU C++

Project Properties->C/C++General->PreprocessorIncludePaths,Macros etc.->Providers
->(Select only 'CDT GCC Built-in Compiler Settings' and add'-std=c++11' to command)

結果は次のとおりです。

the project can build and run successfully
but eclipse CDT always show error: Symbol 'thread' could not be resolved
4

1 に答える 1