TRACKER: Error TRK0005: Could not find: "CL.exe". The system can not find the file specified. Cannot open source file iosteam

every blog every motto: The shortest answer is doing.

0. Preface

There used to be multiple editors such as vs2010, vs2015, vs2019 on this machine. Later, I felt useless to uninstall. Some of them were used when playing python, and I installed vs2010 and later vs2015, so I went back and forth. The local environment is messy. Hey~Do
n’t say much, let’s enter the text below

1. Text

1.1 Error

1.1.1 Unable to open source file iosteam

#include <iostream> This line of code reports an error and cannot be imported.

#include<iostream>
TRACKER : 错误 TRK0005: 未能找到: “CL.exe”。系统找不到指定的文件。
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(356,5): 
error MSB6006: “CL.exe”已退出,代码为 5

Insert picture description here

1.2 Solution

Check the installation path and find that there are no related files such as cl.exe (the screenshot below is normal)
Insert picture description here

I have tried almost all methods on the Internet (Baidu, Google), but still no solution. In the end, it was compromised- uninstall and reinstall!
Note: The following briefly introduces the key steps, detailed installation steps, refer to the link after the text.


1.2.1 Uninstall

Uninstall tool download
The above Microsoft official toolkit, ToUninstaller, follow the above steps to run.
Insert picture description here

1.2.2 Reinstall

The next step, selection and customization
instructions: This should be the key. When installing, the "installation type" selected the default value, so the following "C++" component may not be selected.
Insert picture description here
Select the component
Insert picture description here
environment configuration, and still choose C++
Insert picture description here
installation After finishing the test again, everything is normal.
Insert picture description here

references

[1] https://github.com/Microsoft/VisualStudioUninstaller/releases
[2] https://www.zhihu.com/question/37999956
[3] https://blog.csdn.net/childbor/article/details/81286534

Guess you like

Origin blog.csdn.net/weixin_39190382/article/details/107819238