LoginSignup
4
3

More than 5 years have passed since last update.

Symbol 'cout' could not be resolvedが取れました

Posted at

Eclipse 4.4.2でC/C++混在のプロジェクトを作成したところ、当たり前にインデクサに検索しておいて欲しいシンボルが以下のようなエラーになっていましたが、参考にさせていただいたサイトに書かれてあった方法でそのエラーがなくなりました。

エディタ上でシンボルが見つからないというインデクサのエラー
Symbol 'cout' could not be resolved

環境

  • CentOS 6.6(ゲストOS)
  • Eclipse 4.4.2
  • CDT 8.6.0
  • gcc 4.4.7

インデクサのエラーを消す方法

  1. プロジェクトのプロパティを開き、C/C++ Generalを開く
  2. Preprocessor Include Paths, Macros, etc.ページを開く
  3. Providersタブを開く
  4. CDT GCC Built-in Compiler Settingを選択する
  5. Language Settings Provider OptionsでUse global provider shared between projectsのチェックを外すと、Command to get compiler specs:が設定できるようになるので、-std=c++11を末尾に追加する。
  6. OKを押してダイアログを終了し、Indexerのリビルド。

参考

4
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
3