Code::Blocks

I Started using Code::Blocks and tried to build the default program and an error came.

Here’s the code

#include< iostream >

using namespace std;

int main()

{

cout << “Hello world!” << endl;

return 0;

}

Here’s the error

“hgf - Debug” uses an invalid compiler. Probably the toolchain path within the compiler options is not setup correctly?! Skipping…
Nothing to be done.

I got the Code::Blocks program from a CD that came with my computer text “Programming with C++ by Sumita Arora”. Please can somebody help me on this problem.

1 Like

Hey Arun, I found this on code:blocks forum -

In code:blocks -> go to menu “Settings->Compiler and debugger”. Then select your compiler in the drop down list and choose the tab “Toolchain executables”. Now configure the path of the compiler binaries e.g. /usr/local. Do not add the bin-path.
This is what mine looks like (I have my code blocks on the A drive) -
alt text

4 Likes

I already tried that but to no effect. There is no folder called MinGW on my PC. I’m now downloading it. Thanks for your help anyway Gautam. Hope you continue to help others in the future. :slight_smile:

“There is no folder called MinGW on my PC”

  • Then I think you should get the complete 12.11 version available online instead of the one provided with your CD (That is if the MinGW update doesn’t help).
    Always glad to help :slight_smile:

Thanks again Gautam. :slight_smile:

I’m sorry that this is coming so late, but I found out that there was no compiler in that. I downloaded a new one with a compiler and it now works. Thanks for your help.