title: How do I link Linux libraries for a cross-platform Linux project in Visual Studio 2017?
body: <p>I am on Windows and using a cross-platform project building for Linux in Visual Studio 2017 Community. I am trying to build my project but for some reason a library isn't being detected, or used correctly.</p>
  
  <pre><code>1&gt;Linking objects
  1&gt;/home/ubuntu/projects/LinuxApplication/obj/x64/Debug/main.o: In function `__static_initialization_and_destruction_0(int, int)':
  1&gt;/usr/include/boost/system/error_code.hpp:221: undefined reference to `boost::system::generic_category()'
  1&gt;/usr/include/boost/system/error_code.hpp:222: undefined reference to `boost::system::generic_category()'
  1&gt;/usr/include/boost/system/error_code.hpp:223: undefined reference to `boost::system::system_category()'
  1&gt;/home/ubuntu/projects/LinuxApplication/obj/x64/Debug/main.o: In function `boost::system::error_code::error_code()':
  1&gt;/usr/include/boost/system/error_code.hpp:322: undefined reference to `boost::system::system_category()'
  1&gt;/home/ubuntu/projects/LinuxApplication/obj/x64/Debug/main.o: In function `boost::asio::error::get_system_category()':
  1&gt;/usr/include/boost/asio/error.hpp:230: undefined reference to `boost::system::system_category()'
  1&gt;collect2: error: ld returned 1 exit status
  1&gt;C:\Users\user\source\repos\LinuxApplication\obj\x64\Debug\main.o : error :
  1&gt;/usr/include/boost/system/error_code.hpp:221: undefined reference to `boost::system : error : generic_category()'
  1&gt;/usr/include/boost/system/error_code.hpp:222: undefined reference to `boost::system : error : generic_category()'
  1&gt;/usr/include/boost/system/error_code.hpp:223: undefined reference to `boost::system : error : system_category()'
  1&gt;C:\Users\user\source\repos\LinuxApplication\obj\x64\Debug\main.o: In function `boost::system::error_code: : error :
  1&gt;/usr/include/boost/system/error_code.hpp:322: undefined reference to `boost::system : error : system_category()'
  1&gt;C:\Users\user\source\repos\LinuxApplication\obj\x64\Debug\main.o: In function `boost::asio::error: : error :
  1&gt;/usr/include/boost/asio/error.hpp:230: undefined reference to `boost::system : error : system_category()'
  1&gt;collect2 : error : ld returned 1 exit status
  1&gt;Done building project "LinuxApplication.vcxproj" -- FAILED.
  </code></pre>
  
  <p>After reading some SO posts this seems to be because the library <code>libboost_system</code> can't be found, however it is definitely present at <code>/usr/lib/libboost_system.a</code> but for some reason the build isn't referencing this. I have tried adding the library to the linker in Visual Studio but it still does not seem to work.</p>
  
  <p>If I compile the project manually on the Linux machine using <code>g++ main.cpp -o main -lboost_system</code> the application builds correctly but this means I cannot debug the application so I'd like to get it working for the remote building.</p>
  
  <p>Does anyone know how to link these libraries when using remote build from Visual Studio?</p>