c++0x compiles but eclipse editor errors even with -gnu++0x discovery

前端 未结 2 551
半阙折子戏
半阙折子戏 2020-12-17 19:24

I use some code to report duration of a task using std::chrono::high_resolution_clock ... part of c++0x.

I can successfully compile c++0x features in eclipse cdt usi

相关标签:
2条回答
  • 2020-12-17 19:43

    For chrono in eclipse you should add those symbols

    _GLIBCXX_USE_C99_STDINT_TR1
    

    and

    __cplusplus = 201103L
    

    How to add them:

    Prject properties -> C/C++ General -> Path and Symbols -> Symbols (Tab) -> GNU C++ -> and there click add.

    Remember to add __cplusplus with value 201103L

    0 讨论(0)
  • 2020-12-17 19:50

    Eclipse has it's own parser. That parser can't deal with the c++11 (C++0x) features. So you have to wait until the c++11 support in the eclipse parser will be ready.

    0 讨论(0)
提交回复
热议问题