Kolja Strohm 007c22773b Projektdateien hinzufügen. 7 tahun lalu
..
images 007c22773b Projektdateien hinzufügen. 7 tahun lalu
readme.html 007c22773b Projektdateien hinzufügen. 7 tahun lalu
stylesheet.css 007c22773b Projektdateien hinzufügen. 7 tahun lalu

readme.html


























Setting up your project for Linux Development



With this extension you can author C++ code for Linux servers, desktops and devices. You can manage your connections to these machines from within VS. VS will automatically copy and remote build your sources and can launch your application with the debugger. Our project system supports targeting specific architectures, including ARM.




Connecting to Linux


Prerequisites


Today we only support building remotely on the Linux target machine. We are not limited by specific Linux distros but we do have dependencies on the presence of some tools. Specifically, we need openssh-server, g++, gdb and gdbserver. Use your favorite package manager to install them, e.g. on Debian based systems: sudo apt-get install openssh-server g++ gdb gdbserver



First connection


The first time you target a Linux machine you will be prompted for connection information. This is triggered by building the project.




Adding and removing connections


To add a new connection, go to Tools > Options and search for Linux. From here you can add and remove connections.




To change which connection a project is using go to the project properties remote settings and update the target machine.




Project Properties


All of the options necessary to control C++ compilation are exposed on the project properies pages. We'll cover a few specific to how things work for Linux. First under remote settings, you will see the remote root is set to ~/projects/ by default and that we are setting the remote project directory to match our project name in that location.




Looking at the General settings for the project, you can see how our output and intermediate directories were configured. Additionally, you’ll see that this project was configured as an application – thus our executable is under bin/x64/Debug/ as ConsoleApplication1.out. Notice that for configuration types we also support static and dynamic libraries.



Add additional library dependencies on the Linker > Input property page.




You can pass additional pre launch commands to the debugger to do things like launch graphical apps on the remote linux machine.




You can also send post build events to control remote behavior, as in this example that exports a gpio pin for use without requiring the executable run as super user.








Resources



Check out the VS Gallery VC++ for Linux Development page where we will keep updates posted. You can also check out our announcment blog post for more in depth details on configuring the project properties.



Here are other utilities you will find useful in connection with this extension.




Give us feedback


UserVoice