Home > System Tutorial > LINUX > Reasons and solutions why CodeBlocks cannot be compiled

Reasons and solutions why CodeBlocks cannot be compiled

WBOY
Release: 2024-06-20 00:17:02
Original
966 people have browsed it

CodeBlocks16.01 latest version Baidu Cloud download (installation package includes compiler)

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

Why can’t CodeBlocks be compiled?

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

2. You installed CodeBlocks in a drive other than C drive (such as D drive, E drive, etc.), or although it was installed on C drive, it was customized to be installed outside the default directory during installation. other directories), causing the system to be unable to correctly identify the address of the compiler (this may be a design flaw in the software itself). Please try to uninstall and reinstall, 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 why CodeBlocks cannot be compiled

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 why CodeBlocks cannot be compiled

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 names of the compilers should also be the same as the names in the picture. , otherwise the system still cannot recognize it after setting this step. You need to update each compiler one by one.

Reasons and solutions why CodeBlocks cannot be compiled

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

Reasons and solutions why CodeBlocks cannot be compiled

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 why CodeBlocks cannot be compiled

For example, the C language compiler is mingw32-gcc.exe, then if I go into the directory and change the file name to "COCO-C language compiler.exe", or I don't want to change the name, just put this mingw32- Move the gcc.exe file to the desktop or other places

Reasons and solutions why CodeBlocks cannot be compiled

, at this time I have to 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 the system cannot find the software you install on the D drive, because the system looks for the default installation directory in the C drive by default. In addition, although you installed it on the C drive, it was not installed in the Program Files (x86) folder by default. Instead, it was installed in a new folder you created, or elsewhere. Then the system may not be able to find your compiler at this time. You either have to manually update the directory where the compiler is located, or you don't select any custom options during installation and just stick to the default ones.

Reasons and solutions why CodeBlocks cannot be compiled

The above is the detailed content of Reasons and solutions why CodeBlocks cannot be compiled. For more information, please follow other related articles on the PHP Chinese website!

source:linuxprobe.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template