title: Visual studio 2010, PortAudio DLL compile and linking issues, C++
body: <p>Hi stack overflow users.</p>
  
  <p><strong>Error description:</strong></p>
  
  <p>For a mini project I have decided to use the portaudio library (I use Windows 7 64-bit and C++): <a href="http://portaudio.com/" rel="nofollow noreferrer">http://portaudio.com/</a></p>
  
  <p>Before even using the library I had to build a .DLL file in another Visual Studio Project and then link the output to my own visual studio 2010 project (32-bit). I tried to use this simple piece of code:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;portaudio.h&gt;
  using namespace std;
  void main()
  {
    cout &lt;&lt; "Hello World!" &lt;&lt; endl;   cout &lt;&lt; "Welcome to C++ Programming" &lt;&lt; endl; }
  </code></pre>
  
  <p>I get this error message:
  <em>fatal error C1083: Cannot open include file: 'portaudio.h': No such file or directory</em></p>
  
  <p>I personally don't think it is the creation of the .DLL that is the issue but more a linking issue.</p>
  
  <p><strong>My attempt:</strong></p>
  
  <p>First of all I have attempted to follow this guide: <a href="http://portaudio.com/docs/v19-doxydocs/compile_windows.html" rel="nofollow noreferrer">http://portaudio.com/docs/v19-doxydocs/compile_windows.html</a></p>
  
  <p>By following this guide, I got a compiled .DLL and .Lib files inside the release folder(Image 1):</p>
  
  <p>Afterwards I try to link my visual studio 2010 with portaudio_x86.lib and include the directory where it is located (The output folder of the .DLL creation)(Image 2 and 3)</p>
  
  <p>I myself have very poor experience with using external libraries and even less experience when compiling them yourself. I have only a little experience with previous programming, so I am pretty sure it is just me missing something vital.</p>
  
  <p><img src="https://i.stack.imgur.com/VMQL2.png" alt="The folder filled with the .DLL and .Lib files"><img src="https://i.stack.imgur.com/F0AZs.png" alt="Telling the linker which library to include">
  <img src="https://i.stack.imgur.com/7an84.png" alt="Telling the project what directory to include (In this case, the folder where the .DLL and .Lib is"></p>