1. 程式人生 > >在Eclipse中實現C++ 11的完整支援

在Eclipse中實現C++ 11的完整支援

主要用來解決,Eclipse中編譯c++時,出現的std::threads,std::mutex等的unresolved問題

1、開啟Project -> Properties -> C/C++ General -> Path and Symbols -> Tab [Symbols]. 新增 symbol : __cplusplus 並設定它的值為:201103L

2、project右鍵-> c/c++ build ->Settings -> GCC C++ Compiler -> Miscellaneous -> Other flags後面加上 -std=

c++11

3、Window-> Preference -> Build -> Settings ->Discovery -> CDT GCC Built-in Compiler Settings MinGW(shared) ->(command to get compiler specs) ${COMMAND} -E -P -v -dD "${INPUTS}" -std=c++11