>>One
問題シナリオ
#include
:terminate called after throwing an instance of 'std::system_error' what(): Enable multithreading to use std::thread: Operation not permitted
どうする?
Window>Preference>Build>Settings>Discovery>CDT GCC Built-in Compiler Settings(shared)の(command to get compiler specs)をに変更
${COMMAND} -E -P -v -dD "${INPUTS}" -std=c++11
新規工事項目 Properties>C/C++Build>Settings>Tool Settings>GCC C++Linker>Miscellanous>Linker flagsにパラメータを追加
-Wl,--no-as-needed -pthread
Properties>C/C++Build>Settings>Tool Settings>GCC++Compiler>Miscellanous>Other flags末尾にパラメータを追加
-std=c++11
どうしてそうするの?
なぜGCC C++Compilerに直接パラメータを追加しないのですか?Eclipseは静的ライブラリにコンパイルして実行可能ファイルを生成するため、リンクフェーズにパラメータを追加する必要があります. なぜCDTに-std=c++11を設定するのですか?GCC C C++Compilerでは-std=c++11がコードチェックで有効になっていないため