[英]C++ hello world not working?
I am new to C++ and I am self-teaching. 我是C ++的新手,我自学。 I am using
code::blocks
, and have a question. 我正在使用
code::blocks
,并有一个问题。 When I write hello world, nothing happens. 当我写下你好世界时,没有任何反应。 This is what is says in the debugger window:
这是调试器窗口中的内容:
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))
and here is the program: 这是程序:
#include <iostream>
using namespace std;
int main()
{
cout << "Helloworld!" << endl;
return 0;
}
also if you need it, here is the build log: 如果你需要它,这里是构建日志:
"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).
Try to download the debugger and the compiler again. 尝试再次下载调试器和编译器。 It worked for me when I had this problem.
当我遇到这个问题时,它对我有用。 Try downloading the 'gdb.exe' from the internet.
尝试从互联网上下载'gdb.exe'。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.