readme.html 4.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset='utf-8'>
  5. <link rel="stylesheet" type="text/css" href="stylesheet.css" media="screen">
  6. <title>Getting Started</title>
  7. </head>
  8. <body>
  9. <div class="container">
  10. <div id="header">
  11. <h1>Getting Started</h1>
  12. <h2>Visual C++ for Linux Development extension</h2>
  13. </div>
  14. <table>
  15. <tr>
  16. <div id="main_content">
  17. <td>
  18. <div id="lpanel">
  19. <h1>Setting up your project for Linux Development</h1>
  20. <p>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.</p>
  21. <img src="images\ArchOptions.gif"/>
  22. <h1>Connecting to Linux</h1>
  23. <h2>Prerequisites</h2>
  24. <p>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</p>
  25. <h2>First connection</h2>
  26. <p>The first time you target a Linux machine you will be prompted for connection information. This is triggered by building the project.</p>
  27. <img src="images\firstconnection.png"/>
  28. <h2>Adding and removing connections</h2>
  29. <p>To add a new connection, go to Tools > Options and search for Linux. From here you can add and remove connections.</p>
  30. <img src="images\ManageConnections.gif"/>
  31. <p>To change which connection a project is using go to the project properties remote settings and update the target machine.</p>
  32. <img src="images\ChangeRemote.gif"/>
  33. <h1>Project Properties</h1>
  34. <p>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. </p>
  35. <img src="images\OutputTypes.gif"/>
  36. <p>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.</p>
  37. <p>Add additional library dependencies on the Linker > Input property page.</p>
  38. <img src="images\linker.png"/>
  39. <p>You can pass additional pre launch commands to the debugger to do things like launch graphical apps on the remote linux machine.</p>
  40. <img src="images\debuggerexport.png"/>
  41. <p>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.</p>
  42. <img src="images\postbuild.png"/>
  43. </div>
  44. </td>
  45. <td>
  46. <div id="rpanel">
  47. <h1>Resources</h1>
  48. <p>Check out the <a href="http://aka.ms/vslinuxext">VS Gallery VC++ for Linux Development page</a> where we will keep updates posted. You can also check out our <a href="https://blogs.msdn.microsoft.com/vcblog/2016/03/30/visual-c-for-linux-development">announcment blog post</a> for more in depth details on configuring the project properties.</p>
  49. <p>Here are other utilities you will find useful in connection with this extension.</p>
  50. <ul>
  51. <li>Learn more about <a href="http://aka.ms/vsiot">IoT Development</a></li>
  52. <li><a href="http://aka.ms/vsiotext">VC++ for IoT Development Tools</a></li>
  53. <li><a href="https://github.com/Azure/azure-iot-sdks">Azure IoT SDK</a>, includes a C API for connecting small devices to the Azure IoT Hub</li>
  54. </ul>
  55. <h1>Give us feedback</h1>
  56. <p><a href="http://aka.ms/vslinux-feedback">UserVoice</a></p>
  57. </div>
  58. </td>
  59. </div>
  60. </tr>
  61. </table>
  62. </div>
  63. </body>
  64. </html>