title: Precompiled header is from previous version of compiler
body: <p>How do I use c library in large C++ codebase?</p>
  
  <p>I have found some good <a href="https://github.com/Azure/azure-event-hubs" rel="nofollow noreferrer">c library</a>, and since c and c++ are compatible that's awesome for me. I have this big codebase with many projects, and i want to use that library inside one of projects.</p>
  
  <p>So I built library on C drive, and after that I just placed it into folder with the project i want to use it with, changed references in project properties to target that library etc.</p>
  
  <p>After that I have called from one of cpp files function in my send.c file which included some library files, and got error during building </p>
  
  <pre><code>Precompiled header is from previous version of compiler 
  </code></pre>
  
  <p>So I wanted to ask:</p>
  
  <ol>
  <li>Should I build separately library or is it ok to do this way as I did ?</li>
  <li>How should i fix these errors ? (I tried changing from .c into .cpp but library than has many errors)</li>
  <li>Where should i put library ? Are there any good conventions ? Since now it is just there pasted next to the project</li>
  <li>How can if it can, previous compiling have impact on new build ?! Wouldn't it just precompile it again ?</li>
  <li>In this large codebase i don't see that many libraries so autonomous like this one. Can i turn it somehow into one .lib file and somehow use it easier by just importing it? Since I wont be changing it, it will always be used just for message sending. And like this there is a bunch of things that need to be configured in each project that would use it maybe in the future</li>
  </ol>
  
  <p>Thanks !</p>
  
  <p><strong>Note 1:</strong> 
    I am using Visual Studio 2015 on Windows Server 2012 R2.</p>