0

I am using Intel Compiler on Linux, with Eclipse and for the following code:

#include <iostream>
#include <cstdio>

using namespace std;

int main(){
    cout << "test";
}

cout is not recognised.

If I go to project properties and then "C/C++ General" and then "Paths and Symbols" I have:

/opt/intel/composer_xe_2013.2.146/compiler/include

/usr/include/c++/4.7

/usr/include/c++/4.7/backward

/usr/local/include

/usr/lib/gcc/x86_64-linux-gnu/4.7/include

/usr/lib/gcc/x86_64-linux-gnu/4.7/include-fixed

/usr/include

/usr/include/x86_64-linux-gnu

could some one please help? thanks

EDIT command line used in Eclipse:

icpc -MMD -MP -MF"Main.d" -MT"Main.d" -c -o "Main.o" "../Main.cpp"

Exact error message:

catastrophic error: cannot open source file "bits/c++config.h"

Community
  • 1
  • 1
user997112
  • 29,025
  • 43
  • 182
  • 361
  • Your compiler is probably not properly installed/configured. – Synxis Feb 16 '13 at 18:02
  • 2
    What's the exact error message, and what is the exact command line being run? Does it work when you try to compile on the command line? – Mat Feb 16 '13 at 18:04
  • @Synxis I followed the intel directions, installing the compiler via "Add new software" and it all went through ok. When I created my project I used an Intel toolchain which was available (version 13 I believe). If I do icc --version it gives the correct version number? – user997112 Feb 16 '13 at 18:09
  • @Mat "symbol 'cout' could not be resolved". How can I find out the exact command line being ran? – user997112 Feb 16 '13 at 18:09
  • Can you retrieve the command line generated by Eclipse for the compilation ? – Synxis Feb 16 '13 at 18:10
  • icpc -MMD -MP -MF"Main.d" -MT"Main.d" -c -o "Main.o" "../Main.cpp" catastrophic error: cannot open source file "bits/c++config.h" – user997112 Feb 16 '13 at 18:16
  • The error isnt the same. I have found the path for bits/c++config.h, added this and I still get an error. The error says "/usr/include/c++/4.7/iostream(39): catostrophic error: cannot open source file bits/c++config.h" – user997112 Feb 16 '13 at 18:38
  • Googling your problem showed other people solve it by closing the project and reopening it. – Drew Dormann Feb 16 '13 at 19:04
  • @DrewDormann googling my problem didn't solve it.... manually looking for c++config.h in the linux subsystem and adding that reference did though.... – user997112 Feb 17 '13 at 22:13

0 Answers0