I know this topic was few times there, but I can’t get satisfactory answer.
C:\Users\Krzysiek>gcc test.c
test.c:3:20: fatal error: iostream: No such file or directory
compilation terminated.
This is what I try to do
#include <iostream>
using namespace std;
int main ()
{
cout << "Hello World!";
return 0;
}
Simple program with “include”
I’ve heard of LIBRARY_PATH. So I’ve setted that. Still this same error I have.
GCC provides wrappers around calling its various compilers.
You are using
gcc, which is for C (and consequently will not include or link the C++ standard library; the compiler would go on to complain about the rest of your code, too, since it’s not valid C);Use
g++, which is for C++.Also try to use a conventional extension for C++ source files, which is
.cc,.cxxor.cpp.