CodeFan
CodeFan

Reputation: 33

Fatal error: iostream: No such file or directory #include <iostream>

I encountered a problem when I was learning C++, and encountered errors when I was compiling it.

The details are as follows: enter image description here

enter image description here

Upvotes: 3

Views: 34028

Answers (2)

mahesh
mahesh

Reputation: 1098

You seem to have not installed C++ support in MinGW. If you are using the manual installation route, download the gcc-c++ dev, dll, and bin files. If you are using the automated GUI installer (recommended for newcomer to C++), make sure to check the C++ package: enter image description here

Upvotes: 1

3CxEZiVlQ
3CxEZiVlQ

Reputation: 38508

It seems you have not chosen C++ optional compiler/dev package in mingw32 installer. C++ dev package is not installed by default. Run the installer again and choose there required dev package for install.

You can also add one or more of the following optional compilers or tools. For each you choose to install, you need all three of the bin, the dev and the dll component packages:

  • gcc-c++ (bin and dev and dll) for C++

Upvotes: 1

Related Questions