Home > Common Problem > What to do if an error occurs when executing cl.exe

What to do if an error occurs when executing cl.exe

藏色散人
Release: 2020-10-30 11:07:44
Original
15800 people have browsed it

Solution to the error when executing cl.exe: First open the vc interface; then click ["TOOLS"-"Option"-"Directories"]; finally reset the "Excutable Fils, Include Files... "path or modify the environment variables.

What to do if an error occurs when executing cl.exe

Specific question:

Why is there always "an error occurred while executing cl.exe"

#include<stdio>
main()
{
float a = 12.3,b;
double c;
b = 12345.678;c = 12345.678;
printf("a = %f,b = %f,c =%lf\n",a,b,c);
}
Copy after login

Why is this always "Error while executing cl.exe"

The above should be that was written incorrectly when asking the question

Solution:

The visual you installed is not installed properly. There are two possibilities. One is that the path is wrong. Second, the environment variables are wrong. Let me tell you in a moment.

Are you using the VC compiler?

I also encountered this problem when using this compiler. I don’t know how troublesome it was and it took me several hours.

Specific steps:

1: "CL.exe" is the real compiler (compiler) used by VC, and its path is under "VC root directory\VC98\Bin",

You can find this application under the corresponding path.

So the problem can be solved as follows: Open the vc interface and click VC "TOOLS" -> "Option"

-> "Directories" Set the path of "Excutable Fils, Include Files, Library Files, Source Files". In many cases, the drive letter may be different

(for example, your VC is installed in C, but these paths are all in D), and it will be OK to change it.

If you install vc6.0 according to the initial path, the path should be:

executatble files:
C:\Program Files\Microsoft Visual Studio\Common\MSDev98\Bin
C:\Program Files\Microsoft Visual Studio\VC98\BIN
C:\Program Files\Microsoft Visual Studio\Common\TOOLS
C:\Program Files\Microsoft Visual Studio\Common\TOOLS\WINNT
include files:
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE
C:\Program Files\Microsoft Visual Studio\VC98\MFC\INCLUDE
C:\Program Files\Microsoft Visual Studio\VC98\ATL\INCLUDE
library files:
C:\Program Files\Microsoft Visual Studio\VC98\LIB
C:\Program Files\Microsoft Visual Studio\VC98\MFC\LIB
source files:
C:\Program Files\Microsoft Visual Studio\VC98\MFC\SRC
C:\Program Files\Microsoft Visual Studio\VC98\MFC\INCLUDE
C:\Program Files\Microsoft Visual Studio\VC98\ATL\INCLUDE
C:\Program Files\Microsoft Visual Studio\VC98\CRT\SRC
Copy after login

If you install it on another disk, just follow the path and modify it (I installed it on the D disk) ).

The key is that the things behind Microsoft Visual Studio\ must be the same.

I suffered from it, and it didn’t work after reinstalling it many times. The Chinese part above is for reference by experts.

2: If the above function does not work, you can look at the environment variables.

Right-click My Computer->Select Properties->Select Advanced->Environment Variables->Select PATH Click Edit->Delete everything except VC. That's OK.

My computer can be debugged in this way. no problem. (It is best to create a file to save the content you deleted, just in case).

The above is the detailed content of What to do if an error occurs when executing cl.exe. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
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