Something happened to my compiler, and now I can't even compile hello world. Here's a link to error that I'm getting https://pastebin.com/HtyUdz6f , looks like my std libraries broken or something. How I can fix this problem ?
#include <iostream>
using namespace std;
int main()
{
cout<<"Hello World";
return 0;
}
CodePudding user response:
Try with a different compiler. You're using MinGW-w64 8.1.0, but it could be broken somehow.
An easy way to test your code would be to get a (more up to date) standalone build from https://winlibs.com/ and extract it in a different folder and compile your example with that. It won't interfere with your installed version and when done you can just remove the folder.
CodePudding user response:
This code compiles and runs on other C compilers, therefore the problem is likely caused by the compiler, not by the program itself.
MinGW-w64 8.1.0 has not been updated since 2018, and will most likely stay without updates in the near future. Therefore, the software likely no longer works on modern software/operating systems. You may need to use a different compiler such as Visual Studio. If you are not able to use a different compiler, deleting, then reinstalling MinGW-w64 8.1.0 may solve the issues with the compiler.