[gcc] Can't find file executable in your configured search path for gnc gcc compiler

My problem is that code::blocks error message tells me that it can't find file executable in the search path for gnc gcc compiler. Although, I don't know what that means. Also I typed out some code:

#include <iostream>
 using namespace std;

 int main(void) {
    cout <<"Hello World" <<endl;

    return 0;
 }

I can't build it or run in code::blocks. What do I need to do?

I went on line but I got some answers that are way over my head. I was able to use code::blocks once before I installed Visual studios express 2013. Visual studios didn't work right either. It kept asking me to repair or uninstall every time I tried to open it. So I deleted it along with code::blocks. Now that I re-installed code::blocks I still can't get to work right.

This problem with compilers is taking up all my time and I can't practice learning programming because I can't get any compiler to work right. I need some help, please.

This question is related to gcc codeblocks

The answer is


I'm a total noob but I reinstalled over the codeblocks giving me these "Can't find file executable in your configured search path for gnc gcc compiler" errors by downloading:

codeblocks-20.03mingw-setup.exe

(IMPORTANT: make sure it has the "mingw" in the file download name, that has the compiler build that is required to compile the code which doesn't automatically comes with the main codeblocks editor software download because codeblocks already assumes you already have another compiler installed on your computer {visual studio 2019 or such}).

Then when I created a new project (console application) and used the defaults to quickly test it out.

It gave me errors.

So I went to Settings > Compiler > Selected Compiler set to: GNU GCC Compiler > Click on the "Tooolchain executables" tab > Click on Auto-Detect > Should say "C:\Progam Files\CodeBlocks\MinGW" > Click OK.

Build and run a simple hello world code.

Should work! If not, look for the "MingGW" in the C:\Program Files\CodeBlocks and select it.


Here's an easy way for Windows users.

  1. Uninstall the existing codeblocks from your system.
  2. Restart system.
  3. Go to http://www.codeblocks.org/downloads/26
  4. Download the codeblocks-16.01mingw-setup.exe file. It includes the GCC/G++ compiler and GDB debugger from TDM-GCC (version 4.9.2, 32 bit, SJLJ).


* How to Download and install CodeBlocks.* ( I have already downloaded )


***How to solve the CodeBlocks environment error.

  1. Go to "Settings"----"Compiler"----"Selected compiler"( GNU GCC Compiler ).

  2. Then, Selected "Toolchain executables".

  3. Now, "( C:\Program Files (x86)\CodeBlocks\MinGW )"

See Video : https://youtu.be/Tb1VnXs60Lg


For that you need to install binary of GNU GCC compiler, which comes with MinGW package. You can download MinGW( and put it under C:/ ) and later you have to download gnu -c, c++ related Binaries, so select required package and install them(in the MinGW ). Then in the Code::Blocks, go to Setting, Compiler, ToolChain Executable. In that you will find Path, there set C:/MinGW. Then mentioned error will be vanished.


Just open your setting->compiler and click on the reset defaults and it will start work.


Fistly, Code Blocks is not a compiler. It is just an integrated development environment.

So, you must show the path of your compiler at first, (if you dont have a compiler you have to download an install, it is not difficult to find. f.e. GCC is good one.) If code blocks could not find automatically the path of compiler it is an obligation to show it yourself.

But when you install, probably Code Blocks automatically find your compiler.

Enjoy.


This simple in below solution worked for me. http://forums.codeblocks.org/index.php?topic=17336.0

I had a similar problem. Please note I'm a total n00b in C++ and IDE's but heres what I did (after some research) So of course I downloaded the version that came with the compiler and it didn't work. Heres what I did: 1) go to settings in the upper part 2) click compiler 3) choose reset to defaults.

Hopefully this works


I had also found this error but I have solved this problem by easy steps. If you want to solve this problem follow these steps:

Step 1: First start code block

Step 2: Go to menu bar and click on the Setting menu

Step 3: After that click on the Compiler option

Step 4: Now, a pop up window will be opened. In this window, select "GNU GCC COMPILER"

Step 5: Now go to the toolchain executables tab and select the compiler installation directory like (C:\Program Files (x86)\CodeBlocks\MinGW\bin)

Step 6: Click on the Ok.

enter image description here

Now you can remove this error by follow these steps. Sometimes you don't need to select bin folder. You need to select only (C:\Program Files (x86)\CodeBlocks\MinGW) this path but some system doesn't work this path. That's why you have to select path from C:/ to bin folder.

Thank you.