Reasons and solutions for CodeBlocks not compiling

CodeBlocks16.01 latest version Baidu cloud download (installation package contains compiler)

https://pan.baidu.com/s/1kWjtmKJ

Why can't CodeBlocks compile?

1. The installation package you downloaded does not contain a compiler, please go to the Baidu Cloud link shared above to re-download the installation package.

2. You installed CodeBlocks in other disks other than C disk (such as D disk, E disk, etc., or although it is installed in C disk, it is custom installed in a directory other than the default directory during installation) , causing the system to not correctly identify the address of the compiler (this may be a design flaw of the software itself). Please try uninstalling and reinstalling, and install the software on the C drive during installation, or manually update the path where the compiler is located.

The update steps are as follows:

The first step: Setting->Compiler, that is, Setting->Compiler

Reasons and solutions for CodeBlocks not compiling Causes and solutions for CodeBlocks not compiling

Step 2: Go to Toolchain exectables, the executable tool link (or address, the link in windows points to the address, which means the address of your compiler tool)

Reasons and solutions for CodeBlocks not compiling Causes and solutions for CodeBlocks not compiling

Step 3: Click the icon "..." to find your installation directory.

Note that there should be a bin (toolbox) folder in the directory you selected, and all compilers should be in this bin directory, and the name of the compiler should be the same as the name on the picture, otherwise this After the step is set, the system still cannot recognize it, and where each compiler is, you need to update it one by one.

Reasons and solutions for CodeBlocks not compiling Causes and solutions for CodeBlocks not compiling

Let me give an example in this step. For example, my installation directory is in C:\Program Files (x86)\CodeBlocks\MinGW

Reasons and solutions for CodeBlocks not compiling Causes and solutions for CodeBlocks not compiling

When you enter this directory, you will see a bin folder. After opening the bin folder, you will see many executable files (exe format), some of which are compilers.

Reasons and solutions for CodeBlocks not compiling Causes and solutions for CodeBlocks not compiling

For example, the C language compiler is mingw32-gcc.exe, then if I enter the directory and change the file name to "COCO-C language compiler.exe", or I don't change the name, put this mingw32-gcc.exe Move files to desktop or elsewhere

Reasons and solutions for CodeBlocks not compiling Causes and solutions for CodeBlocks not compiling

, at this time, I will go to the compiler settings page to update the location and name of the C language compiler, otherwise, how can the system find it. This is also the reason why you install the software on the D drive and the system cannot find it, because the system looks for the default installation directory in the C drive by default. In addition, if you install it on the C drive, it is not installed in the Program Files (x86) folder by default, but installed in your own newly created folder, or other places. Then the system may not be able to find where your compiler is at this time. You either manually update the directory where the compiler is located, or do not select any custom options during installation, and honestly follow the default.

Reasons and solutions for CodeBlocks not compiling Causes and solutions for CodeBlocks not compiling

The original text comes from:  https://www.linuxprobe.com/codeblocks-solve.html

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325214001&siteId=291194637