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

Can vscode be used to compile c

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

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

Editor to share with you whether vscode can be used to compile c, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!

Vscode (Visual Studio Code) is a lightweight and powerful code editor that supports Windows,OS X and Linux. Built-in JavaScript, TypeScript and Node.js support, and has a rich plug-in ecosystem, you can install plug-ins to support other languages such as Cpicurus +, C #, Python, PHP, and so on.

The vscode editor supports writing in multiple languages and file formats. As of September 2019, 37 languages or files are supported: F#, HandleBars, Markdown, Python, Jade, PHP, Haxe, Ruby, Sass, Rust, PowerShell, Groovy, R, Makefile, HTML, JSON, TypeScript, Batch, Visual Basic, Swift, Less, SQL, XML, Lua, Go, C++, Ini, Razor, Clojure, C#, Objective-C, CSS, JavaScript, Perl, Coffee Script, Java, Dockerfile.

VScode configure C language runtime environment

First of all, install VScode, download the installation package directly on the official website and install it. I won't repeat it here. Then, install the plug-in extension:

Search the extension store on the left to install Microsoft's official plug-in.

Then install mingw-w64, corresponding to the corresponding version of your own computer, but now it is generally 64-bit.

The download link is here, but I have a problem when I install its MinGW-W64-install.exe file, so it is recommended to download the zip file directly (as shown in figure):

After downloading, extract it to the location you want, and then configure the environment variables:

Right click on my computer-> Properties-> Advanced system Settings-> Environment variables-> find Path in the system variable and click Edit:

Change to the directory you unzipped, then open the command line cmd window and type gcc-v to test whether the configuration is successful.

Open VScode, create a new folder named .vscode under the project file you want to write in c language, and then create a new c language file in your project directory, and feel free to write some test code (mine is test.c):

Click the button that looks like a bug, and then click the setting gear icon, select C++ (GDB), and then you will be asked to select another one, at this time select the first, VScode will automatically generate two files for you, launch.json and tasks.json, when the environment is configured, CTRL+F5 can compile and run C programs.

The above is all the content of the article "can vscode be used to compile c". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

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

Internet Technology

Wechat

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

12
Report