cwindowscodeblocks

How to configure codeblocks?


Why doesn't codeblock find a compiler? I previously tried to install codeblocks(without the mingw setup) into my c: and tried to configure cygwin for it and since I was unsuccessful, I completely uninstalled codeblocks and downloaded the codeblocks with the mingw setup and installed it on my E:, which I thought would have been preconfigured, but the settings from the older one remained:

enter image description here
I had downloaded the mingw setup and installed it on my E: : enter image description here

Since I had the cygwin gcc as the selected compiler, but the site mentioned that the mingw setup had gcc/g++ compiler and debugger, I(thought) I would have to select one from the list but there were many, so I just selected one:

enter image description here
But the compiler always produces an error message:
enter image description here
If the compiler was included within the installer, shouldn't it had configured the path itself? How do I configure codeblocks so that I can start compiling c codes?


Solution

  • If the codeblocks installer failed to setup mingw for you, here's how you can manually add it. In the global compiler settings dialog that you're showing above:

    Now whenever you start a new project, when you get to the wizard screen that says something like "Please select the compiler to use...", select "GNU GCC Compiler" (again it should be the first option).