How to Solve CodeBlocks Can't Find Compiler Problem
Here is the common error message you will see after launching code blocks 'can't find the compiler executable in your search path (GNU GCC compiler)'. It means the Compiler can't be detected by code blocks. Most of the time, this problem can be solved by following the steps below:
Step 1: Go to the settings tab of your code blocks
Step 2: Go to the compiler settings
Step 3: Reset the compiler settings to default by clicking on 'Reset Defaults'
Step 4: Go to the 'toolchain executable' tab and auto-detect compiler's installation directory
Most of the time 'can't find compiler executable in your configured search path for gnu gcc compiler' error appears because of this mismatch of the compiler installation directory. I always install code blocks in the c drive to eliminate this. Again it is not a big issue because when you click on the auto detect button, it automatically detects the Compiler's installation directory. After completing the above steps, your problem going to be solved. If it still doesn't work, then check the process explained below.
Why CodeBlocks Can’t Find Compiler?
There are some common reasons that your Code::Blocks is not getting any compiler. Here are some common reasons why your CodeBlocks can't find a compiler:
- You installed the CodeBlocks without the compilers
- Wrong installation of CodeBlocks
Many people download CodeBlocks without the MinGW and don't install it separately. If you don't know how to get and install MinGW separately, you should download CodeBlocks with MinGW. Here is an article about how to install CodeBlocks properly.
Again with proper installation of MinGW, you can run C and C++ from any drive of your device, and it also helps you to run C/C++ in VS Code. Here is an article about How to Run C/C++ in Visual Studio Code.