Issue
I have created C++ console program targeting Linux from Visual Studio. I have virtual machine that is running Ubuntu. The goal over here is test out the working of Visual Studio for Linux and then create Shared Items project which can be used for Linux as well as Windows.
The program is simple Hello World program where I am trying to include header files provided by vendor. I am following the steps mentioned here and over here. Everything works fine and it prints Hello World in Linux terminal but as soon as I try to include other headers it does not compile. It does not show red lines under the #include but when I run the program in debug mode it gives no such file or directory error. Also, how can I link libraries(.so) file in Visual Studio. Do I follow the same procedure that is used for linking .lib files?
As mentioned it is simple code:
Solution
Okay, the problem was the headers were not synchronized with the remote Linux machine. Although, I had the headers on remote machine there needs to be copy of that on local development system. In order to do that, in Visual Studio under Tools->Options->Cross Platform->Connection Manager->Remote Headers Intellisense, pick your machine IP address on the right hand side under "List of remote header caches" and press Update button.
Answered By - Dwight Schrute Answer Checked By - Senaida (WPSolving Volunteer)