Use Visual Studio To Write C ++ code for Linux.

Source: Internet
Author: User

[Switch] using Visual Studio To Write C ++ code for Linux, Visual Studio

The Visual Studio 2016 extension first announced by Microsoft at the Build 2015 Conference provided the ability to write C ++ code in VS2015 and then compile and execute it on a Linux/UNIX computer. This idea is very simple: Use Visual Studio 2015 to write and develop C ++ code, and then deploy the code to a remote computer running Linux for compilation and debugging.

This extension can communicate with remote computers running Windows and g ++ compiler through SSH. This means that although the extension is built for Linux, it can run on other UNIX operating systems, including FreeBSD and Mac OS X, in addition to Linux. This also means that devices such as Raspberry Pi and Intel Edison board can also be supported, so that Windows platform developers can easily write code for such devices.

In the latest version 1.0.3, Visual Studio also provides a console window to interact with the remote execution program of the project. This window allows you to view program output results and input content (only console-style command input is supported, and mouse or other input methods are not supported currently ).

It is very easy to execute the above process on a Windows 10 computer: Install the extension, start VS2015, create a console application with the Linux as the target, and enter the login creden of the Linux computer, start to compile the code. This extension uses the g ++ compiler on a Linux computer (such as Debian) to compile the project. You can view the compilation and program execution results in the new Linux Console window. You can view the remote account on a Linux computer and find that a directory named "projects" is added to the main directory of the account. one of the directories is named after the VS2015 project, subdirectory containing the project source code.

Microsoft employee Marc Goodner wrote a list listing all the bugs that were improved and fixed in this version. The most important fix is that you can use command line parameters during Remote Execution and files outside the project directory.

View Original English text: Writing C ++ for Linux on Visual Studio

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.