我无法在代码块中编译c ++程序。它给了我错误

I can't compile c++ program in code blocks. It gives me error

本文关键字:程序 错误 编译 代码      更新时间:2023-10-16

当我运行程序(单个Hello world程序(时,在代码块中。

这是代码:

#include <iostream>
using namespace std;
int main()
{
cout << "Hello world!" << endl;
return 0;
}

它给了我一个错误:

Project/Target: "test - Debug":
The compiler's setup (GNU GCC Compiler) is invalid, so Code::Blocks cannot find/run the compiler.
Probably the toolchain path within the compiler options is not setup correctly?!
Do you have a compiler installed?
Goto "Settings->Compiler...->Global compiler settings->GNU GCC Compiler->Toolchain executables" and fix the compiler's setup.
Tried to run compiler executable 'C:MinGW/bin/mingw32-gcc.exe', but failed!
Skipping...
Nothing to be done (all items are up-to-date).

您必须下载mingw设置,其中包括一个带有IDE 的编译器