Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

A case study of building VSCode+CMake+Clang+GCC environment under win10

2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

This article will explain in detail the case of building a VSCode+CMake+Clang+GCC environment under win10. The editor thinks it is very practical, so I share it for you as a reference. I hope you can get something after reading this article.

Install softwar

CMake

CMake is a cross-platform automated construction system that uses a file called CMakeLists.txt to describe the build process.

Download and install on the official website, operate like a fool

Remember to add the bin file in the installation directory to the system environment variable, which can be checked at the time of installation. If you check it, you don't have to add it yourself.

Check if the installation is successful:

MinGW

MinGW, namely Minimalist GNU For Windows, is the product of porting GNU development tools to the Win32 platform, and is a set of GNU toolsets on Windows. To put it simply, MinGW is a compiled environment; it is equivalent to GCC under linux

Download link on the official website

After installation, add the path to the bin folder in the installation directory to the environment variable:

Clang

Similar to GCC compiler, its goal is to kill GCC (see others say so on the Internet).

Wikipedia:

Clang (pronounced / "kl kids" / similar to the English word clang [1]) is a compiler front end for C, C++, Objective-C, and Objective-C++ programming languages. It uses LLVM as its back end and releases a new version starting with LLVM2.6. Its goal is to provide an alternative to the GNU compiler suite (GCC) that supports most of the compilation settings of the GNU compiler and extensions to unofficial languages. The author is Chris Ratna (Chris Lattner), developed under the auspices of Apple, and the source code license is the BSD-like open source license of the University of Illinois at Urbana-Champaign.

It can be used in VSCode to provide smart tips.

Download from the official website

Install foolishly and add the path to the bin folder in the installation directory to the environment variable

Install the VSCode plug-in

As shown in the figure, install the plug-ins in the figure:

Create a new folder and start playing the code.

Main.cpp

# include using namespace std;int main (int argc, char* argv []) {int a = 89; int b = ajar; char buf [10]; cout

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report