DJ SpiderByte
DJ SpiderByte

Reputation: 53

C++ hello world not working?

I am new to C++ and I am self-teaching. I am using code::blocks, and have a question. 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).

Upvotes: 5

Views: 3377

Answers (1)

user1849298
user1849298

Reputation:

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.

Upvotes: 6

Related Questions