Compilers such as GCC are often the choice used with VSCode. This means that, although you can use VSCode on a variety of platforms, you’ll need to find a compiler that works on the operating system you are targeting. Native code is dependent upon your specific operating system. To execute your C++ code, you need to compile the source code you enter into an executable file containing native code. As such, even though it easily can be used to run JavaScript or display HTML, it is a bit more difficult to run code that requires a build process. Visual Studio Code is primarily an editor that can be extended. The description also should include a link to install, reload, or disable the extension. This will list the extensions, similar to what is shown in Figure 4.įigure 4: C++-related extensions for Visual Studio CodeĬlicking the extension name will present additional information on the right side of the editor window. You can find extensions that can be added by clicking the extension’s icon on the left and then entering C++ in the search box. CrossBuild: A build system for embedded development.C++ Advanced Lint: Analysis extensions for C/C++ that support a number of back-end analyzing programs.C++ Algorithm Mnemonics: C++ Algorithm Mnemonics as code snippets for VSCode.C++ IntelliSense: IntelliSense with the help of GNU Global tags for C/C++.C/C++ Snips: Support for C/C++ code snippets.C/C++ Clang Command Adapter: Includes completion and diagnostic for C, C++, and Objective-C using Clang Commands.In addition to the basic C/C++ coding extension for Visual Studio Code, there are several other C++ extensions that can be used with the editor. Figure 3 shows the Visual Studio Code with a code listing included.įigure 3: Colored C++ Code in VS Code Other C++ Extensions for VSCode You’ll also see that the editor supports many of the features mentioned earlier. Once you’ve added this extension, you’ll be able to enter C/C++ programs in VSCode. You might then need to click another Install button, also shown in Figure 2.įigure 2: Installing the C++ Extension in Visual Studio Code The install process likely will open your copy of Visual Studio Code, as shown in Figure 2. As you can see in the figure, a simple click of Install should start the installation of the C/C++ extension.įigure 1: The Marketplace listing for the C++ Extension You can get many of the details either from the marketplace or from the Microsoft C/C++ extension for VSCode documentation page.įigure 1 presents what is seen at this URL. The extension includes support for code formatting, auto-completion, debugging, and a lot more. There is an extension for Visual Code for C/C++ that can be installed from the Visual Studio Marketplace. In addition to being cross platform, Visual Studio Code also can support a number of programming languages, including JavaScript, Java, PHP, Python, Go, C#, and, as indicated by this article, C and C++.Įven though support for JavaScript, HTML, and a few other languages are included with the basic download, others require that you add an extension. The slideshow indicated some of the things that developers wanted, ranging from a lightweight editor to cross-platform support. Back in 2015, Codeguru did a slideshow, “ Top 10 Visual Studio Code How-To-Stories” that presented some of the key features of Visual Studio Code. More specifically, it targets Windows 7 or later, Debian, Ubuntu, Red Hat, Fedora, SUSE, and Mac OS 10.9 or later. Visual Studio Code is a lightweight editor for coding on Windows, Linux, or the MacOS. With the addition of the C/C++ extension to Visual Studio Code, you might have what is needed in a small, cross-platform editor. Although a full-blown version of Visual Studio, such as Visual Studio Community Edition, can be great tool for doing C and C++ coding, there are many times when it can be overkill. Having said that, they could be wrong! More importantly, people looking to learn C or C++ from ground zero might find many editors to be so overloaded with features that it distracts from learning the core language. C++ developers tend to be partial to their editors and might consider Visual Studio Code (VSCode) as a lightweight tool not worthy of their attention.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |