Yahoo India Web Search

Search results

  1. In this tutorial, you configure Visual Studio Code to use the GCC C++ compiler (g++) and GDB debugger from mingw-w64 to create programs that run on Windows. After configuring VS Code, you will compile, run, and debug a Hello World program.

  2. Mingw-w64 is a popular, free toolset on Windows. It provides up-to-date native builds of GCC, Mingw-w64, and other helpful C++ tools and libraries. Download using this direct link to the MinGW installer .

  3. Install the Microsoft Visual C++ (MSVC) compiler toolset. If you have a recent version of Visual Studio, open the Visual Studio Installer from the Windows Start menu and verify that the C++ workload is checked. If it's not installed, then check the box and select the Modify button in the installer.

  4. You can debug Windows applications created using Cygwin or MinGW by using VS Code. To use Cygwin or MinGW debugging features, the debugger path must be set manually in the launch configuration ( launch.json ).

  5. This article provides an overview of code editing and navigating features specific to the C/C++ extension. For more information about general editing and navigating in Visual Studio Code, see Basic Editing and Code Navigation.

  6. Without any configuration, the extension will attempt to locate headers by searching your workspace folder and by emulating a compiler it finds on your computer. (for example, cl.exe/MinGW for Windows, gcc/clang for macOS/Linux).

  7. Download the Visual Studio Code installer for Windows. Once it is downloaded, run the installer (VSCodeUserSetup- {version}.exe). This will only take a minute. By default, VS Code is installed under C:\Users\{Username}\AppData\Local\Programs\Microsoft VS Code. Alternatively, you can also download a Zip archive, extract it and run Code from there.

  8. To identify a compiler for IntelliSense, the C/C++ extension scans common paths on your machine for compilers such as Clang, GCC, MinGW, cygwin, cygwin64, and MSVC. If any of these compilers are identified and in a secure location, they are automatically configured for IntelliSense.

  9. Learn about all the C++ editing features available in VS Code. Check out the Hello World tutorials for getting started with C++ for your toolset and platform: GCC on Windows. Microsoft C++ on Windows. GCC on Linux. GCC on Windows Subsystem For Linux. Clang/LLVM on macOS.

  10. This article is about configuring the C/C++ extension to provide proper IntelliSense (e.g. code completions) in Visual Studio Code when you compile for a different architecture than your development host machine. For example, when your host machine is x64 but you are compiling for Arm.

  1. People also search for