Skip to content

Add tutorial on how to set up Linux C and C++ header files in Visual Studio 2017 #1

Description

@tommai78101

Steps on how to enable this from a completely brand new WSL installation.

  1. Run WSL.
  2. Enter credentials.
  3. Press Enter just a few times until you see your username.
  4. $ sudo apt install -y build-essentials
  5. $ sudo apt install -y gdbserver
  6. $ sudo apt install -y openssh-server
  7. $ sudo nano /etc/ssh/sshd_config
  8. Note the number next to "Port"
  9. Set the option next to "PasswordAuthentication" to "yes"
  10. CTRL+O to save.
  11. CTRL+X to quit.
  12. $ sudo service ssh force-reload
  13. $ sudo ssh-keygen -A
  14. $ sudo service ssh start
  15. We need to test the connection.
  16. $ ssh [your username]@localhost -p [enter the "Port" number]
  17. If it requests for your password, the connection is successful. If connection is refused, some other application is blocking the port.
  18. Change port number in sshd_config if connection is refused. Repeat from Step 12.
  19. We exit the ssh session.
  20. $ exit
  21. Do all the steps in this article, from the top of this article
    https://blogs.msdn.microsoft.com/vcblog/2017/02/08/targeting-windows-subsystem-for-linux-from-visual-studio/
  22. Explore the downloaded Linux C and C++ header files.
  23. Copy the path to the includes directory.
  24. Add them to the project configuration pages > VC++ Directories > Includes
  25. Let IntelliSense finish.

Sources:

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions