C++你好世界不工作

C++ hello world not working?

本文关键字:工作 世界 你好 C++      更新时间:2023-10-16

我是C++新手,我是自学成才的。我正在使用code::blocks,并有一个问题。 当我写你好世界时,什么都没有发生。这是调试器窗口中的内容:

Building to ensure sources are up-to-date
Selecting target: 
Debug
ERROR: You need to specify a debugger program in the debuggers's settings.
(For MinGW compilers, it's 'gdb.exe' (without the quotes))
(For MSVC compilers, it's 'cdb.exe' (without the quotes))

这是程序:

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

另外,如果您需要它,这里是构建日志:

"hello world again - 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?!
Goto "Settings->Compiler and debugger...->Global compiler settings->GNU GCC Compiler->Toolchain executables" and fix the compiler's setup.
Skipping...
Nothing to be done (all items are up-to-date).

尝试再次下载调试器和编译器。当我遇到这个问题时,它对我有用。尝试从互联网下载"gdb.exe"。