search
HomeDevelopment ToolsVSCodevscode configures c language development environment

vscode configures c language development environment

Dec 30, 2019 pm 04:25 PM
c languagevscodedevelopment environmentConfiguration

vscode configures c language development environment

Get C/C extension

Open vscode, use the ctrl shift x shortcut key to open the store, search for C/C, install the plug-in and restart vscode

vscode configures c language development environment

Install GCC

Download MinGW, open the installation program, install to the D drive (you need to create the MinGW folder), the installation is complete Then generate the MinGW installation manager. The manager opens automatically (please do it manually if not), click All Packages, select gcc.bin, g .bin, gdb.bin, click Installation, select Apply Changes, and click Apply to submit for installation.

vscode configures c language development environment

win R, enter control to enter the control panel, click System and Installation->System->Advanced System Settings->Environment Variables, find Path-> Edit->New, paste the bin folder path of the installed MinGW into it.

vscode configures c language development environment

Configure smart prompts

Write a test file demo.c, click on the "prompt light" under the imported standard library, Generate c_cpp_properties.json file

Edit c_cpp_properties.json

vscode configures c language development environment

##c_cpp_properties.json modification content is as follows:

vscode configures c language development environment

Enable debugging

F5 or Ctrl F5 enables debugging, select C (GDB/LLDB) to generate the launch.json file, modify it as follows:


vscode configures c language development environment

Ctrl Shift P Enter Tasks:Configure Task to configure the task, choose to use the module to create the task.json file, select the Others template, generate the task.json file, modify it as follows:

vscode configures c language development environment

If an error occurs: process terminated, exit code: 1, it may be that gcc has not been loaded by the editor (test method: open the console, enter gcc, and see the prompt message), just restart the editor.

Recommended related articles and tutorials:

vscode tutorial

The above is the detailed content of vscode configures c language development environment. For more information, please follow other related articles on the PHP Chinese website!

Statement
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
Visual Studio vs. VS Code: Installation, Setup, and Ease of UseVisual Studio vs. VS Code: Installation, Setup, and Ease of UseApr 30, 2025 am 12:05 AM

VisualStudio and VSCode have their own advantages and disadvantages, which are suitable for different development needs. VisualStudio is suitable for large projects and provides rich functions; VSCode is lightweight, flexible, and has cross-platform support.

Visual Studio's Purpose: Code Editing, Debugging, and MoreVisual Studio's Purpose: Code Editing, Debugging, and MoreApr 29, 2025 am 12:48 AM

VisualStudio is a multi-functional integrated development environment that supports multiple programming languages ​​and complete development processes. 1) Code editing: Provides intelligent code completion and reconstruction. 2) Debugging: Built-in powerful debugging tools, supporting breakpoint and variable monitoring. 3) Version control: Integrate Git and TFVC to facilitate team collaboration. 4) Testing: Supports multiple test types to ensure code quality. 5) Deployment: Provides a variety of deployment options to support deployment requirements from on-premises to the cloud.

Visual Studio vs. VS Code: A Comparison of Code EditorsVisual Studio vs. VS Code: A Comparison of Code EditorsApr 28, 2025 am 12:15 AM

VisualStudio is suitable for large-scale project development, while VSCode is suitable for lightweight and highly customizable environments. 1. VisualStudio provides powerful intelligent perception and debugging functions, suitable for large-scale projects and enterprise-level development. 2. VSCode provides flexibility and customization capabilities through extended systems, suitable for multiple programming languages ​​and cross-platform development.

Visual Studio's Pricing: Understanding Subscription ModelsVisual Studio's Pricing: Understanding Subscription ModelsApr 27, 2025 am 12:15 AM

VisualStudio subscriptions are available in multiple levels, suitable for different developers' needs. 1. The basic version is free and suitable for individuals and small teams. 2. Advanced versions such as Professional and Enterprise provide advanced tools and team collaboration functions, suitable for enterprise users.

Visual Studio vs. VS Code: Performance and Resource UsageVisual Studio vs. VS Code: Performance and Resource UsageApr 26, 2025 am 12:18 AM

The difference between VisualStudio and VSCode in performance and resource usage is mainly reflected in: 1. Startup speed: VSCode is faster; 2. Memory usage: VSCode is lower; 3. CPU usage: VisualStudio is higher during compilation and debugging. When choosing, it must be determined based on project requirements and development environment.

Visual Studio: The IDE for C#, C  , and MoreVisual Studio: The IDE for C#, C , and MoreApr 25, 2025 am 12:10 AM

VisualStudio (VS) is a powerful integrated development environment (IDE) developed by Microsoft, which supports multiple programming languages, such as C#, C, Python, etc. 1) It provides a rich set of features including code editing, debugging, versioning and testing. 2) VS processes code through powerful editors and debuggers, and supports advanced code analysis and reconstruction using Roslyn and Clang/MSVC compiler platforms. 3) Basic usage is like creating a C# console application, and advanced usage is like implementing polymorphism. 4) Common errors can be debugged by setting breakpoints, viewing output windows, and using instant windows. 5) Performance optimization suggestions include the use of asynchronous programming, code reconstruction and performance analysis.

Visual Studio: Code Compilation, Testing, and DeploymentVisual Studio: Code Compilation, Testing, and DeploymentApr 24, 2025 am 12:05 AM

In VisualStudio, the steps for compiling, testing and deploying the code are as follows: 1. Compiling: Use VisualStudio's compiler options to convert source code into executable files, supporting multiple languages ​​such as C#, C and Python. 2. Testing: Use built-in MSTest and NUnit to perform unit testing to improve code quality and reliability. 3. Deployment: Transfer applications from the development environment to the production environment through web deployment, Azure deployment, etc. to ensure security and performance.

Visual Studio: An Introduction to the Integrated Development Environment (IDE)Visual Studio: An Introduction to the Integrated Development Environment (IDE)Apr 23, 2025 am 12:02 AM

VisualStudioisMicrosoft'sflagshipIDE,supportingmultipleprogramminglanguagesandenhancingcodingefficiency.1)ItoffersfeatureslikeIntelliSenseforcodeprediction,multi-tabbedinterfaceforprojectmanagement,andtoolsfordebugging,refactoring,andversioncontrol.2

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function