title: Using vcpkg and compiling in Visual Studio 2015
body: <p>I am trying to compile (by porting) some code in Windows 10 that was originally developed for Linux.</p>
  
  <p>The code depends on 2 external libraries: <code>cppkafka</code> and <code>librdkafka</code>. </p>
  
  <p>I saw that <code>vcpkg</code> is able to get the libraries, compile them, and then make them automatically available in Visual Studio 2015 (through the <code>vcpkg integrate install</code> command).</p>
  
  <p>I see that the <code>vcpkg</code> compiles the dependencies for windows 64 (<code>cppkafka</code> and <code>librdkafka</code>) properly, as the .dll, .lib... are all made available on the install folder of <code>vcpkg</code>. </p>
  
  <p>When I try compiling my code in Visual Studio 2015, I see errors concerning the dependencies headers, which for me is unexpected. If <code>vcpkg</code> compiled them, why Visual Studio doesn't? From the <code>vcpkg</code> documentation, I assume they use the same compiler. Next I show some example errors I am getting:</p>
  
  <pre><code>1&gt;------ Build started: Project: AndreKafkaDriver, Configuration: Release x64 ------
  1&gt;C:\...\vcpkg\installed\x64-windows\include\librdkafka/rdkafka.h(64): error C2371: 'ssize_t': redefinition; different basic types
  1&gt;  C:\Siemens\Automation\WinCC_OA\3.16\api\include\winnt\win32.h(47): note: see declaration of 'ssize_t'
  1&gt;c:\...\vcpkg\installed\x64-windows\include\cppkafka\header_list.h(265): warning C4267: 'argument': conversion from 'size_t' to 'ssize_t', possible loss of data
  1&gt;C:\...\vcpkg\installed\x64-windows\include\cppkafka/utils/buffered_producer.h(1035): error C2065: 'queue1': undeclared identifier
  1&gt;C:\...\vcpkg\installed\x64-windows\include\cppkafka/utils/buffered_producer.h(1035): error C2065: 'queue2': undeclared identifier
  1&gt;C:\...\vcpkg\installed\x64-windows\include\cppkafka/utils/buffered_producer.h(1035): error C2065: 'mutex': undeclared identifier
  1&gt;C:\...\vcpkg\installed\x64-windows\include\cppkafka/utils/buffered_producer.h(1035): error C2275: 'std::mutex': illegal use of this type as an expression
  1&gt;C:\...\vcpkg\installed\x64-windows\include\cppkafka/utils/buffered_producer.h(1035): note: see declaration of 'std::mutex'
  1&gt;C:\...\vcpkg\installed\x64-windows\include\cppkafka/utils/buffered_producer.h(1035): error C2182: 'swap_queues': illegal use of type 'void'
  1&gt;C:\...\vcpkg\installed\x64-windows\include\cppkafka/utils/buffered_producer.h(1035): error C2470: 'cppkafka::BufferedProducer&lt;BufferType,Allocator&gt;::swap_queues': looks like a function definition, but there is no parameter list; skipping apparent body
  1&gt;C:\...\vcpkg\installed\x64-windows\include\cppkafka/utils/buffered_producer.h(1035): error C2072: 'cppkafka::BufferedProducer&lt;BufferType,Allocator&gt;::swap_queues': initialization of a function
  1&gt;kafkaHWService.cxx(29): fatal error C1083: Cannot open include file: 'execinfo.h': No such file or directory
  ...
  </code></pre>
  
  <p>Thanks in advance,</p>
  
  <p>Nerea</p>