+ 2
Fatal error: iostream: no such file or directory
Hey, when I make my first hello world program and try to build and run in code blocks, it gives me 1 error and it's Fatal error: iostream: no such file or directory. How can I solve this?
25 odpowiedzi
0
You have to add path - https://code.visualstudio.com/docs/cpp/config-mingw
Read 4. Add the path.....
if you don't have mingw install it 3.
If you still have problems, you can try visual studio by Microsoft, they have own compiler that will automatically install along with the IDE
write g++ --version in the command line
+ 4
May be you have created c project instead of cpp that's why it giving error.
If u didn't getting error watch this video may be it will help you.
https://youtu.be/rSGQOcR7a3E
+ 1
http://www.codeblocks.org/downloads/26
+ 1
So basically the solution of krystof worked best and it's all I've done which is installing mingw and choosing it's path in cb and it didn't work the first try cause i think i did it wrong but after i watched the video on how to do it correctly it was done correctly.
Thanks everyone for helping me
0
Can you please paste the code here?
0
#include <iostream>
using namespace std;
int main()
{
cout << "Hello world!";
return 0;
}
0
It's just that I'm totally new and I don't know anything like what's a header, a class or a console, basically nothing and I googled a lot but found nothing, all were about more and more complicated stuff, i really apologize for being so noob lol
0
Youssef Hossam the code is fine, where are you compiling it?
0
Code blocks
0
What operating system are you using?
0
I checked that swim
0
Windows 7 ultimate
0
It's GNU GCC compiler
0
I think you haven't setup the compiler correctly. Delete code::blocks and on their site, there is download option "cb mingw setup" download this one you will have compiler already setup for you.
0
Okay I'll do that
0
Thanks everyone for your time
0
If it's working, please mark Right answer with ✔️
0
Ok
0
Okay so I've downloaded the program from the link you provided then it couldn't open cause it should've been a 32 bit program or something so I downloaded another one which was of 32 bit from the site which had the text (compiler included), after that I installed it then chose the option that installs the gnu gcc compliler and after I installed it and ran it it gave me a message on the left bottom of my screen saying "can't find executable in your configured search path's for gnu gcc compiler" .