title: Visual Studio (C++) is automatically linking against an unwanted version of lib file
body: <p>I am trying to create a C++ project in Visual Studio 2013 that has <a href="http://www.cgal.org" rel="nofollow noreferrer">CGAL</a> and Boost (and a couple of other libraries) as dependencies. I preferably like to link to these libraries dynamically. Also, I'd like to link to the "Release" versions of these libraries for performance reasons (not the "Debug" versions).</p>
  
  <p>Starting from an empty C++ project, I added the path to header files of the aforementioned libraries as shown in the image below:</p>
  
  <p><a href="https://i.stack.imgur.com/FxGBy.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FxGBy.png" alt="Include directories"></a></p>
  
  <p>Inside the linker options, I then added the directories that contain the DLL and lib files of the external libraries. (<code>CGAL</code> directory contains CGAL's compiled DLL files along with lib files).</p>
  
  <p><a href="https://i.stack.imgur.com/TJKns.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TJKns.png" alt="enter image description here"></a></p>
  
  <p>At this point, I have not added a single "lib" file "Additional Dependencies" dialog:</p>
  
  <p><a href="https://i.stack.imgur.com/qqT9P.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qqT9P.png" alt="enter image description here"></a></p>
  
  <p>Now something weird is going on and I cannot explain why. If I try to build the project as-is (under the "Debug" configuration), I get a <code>LNK1104</code> error about the linker not being able to find <code>CGAL-vc120-mt-gd-4.7.lib</code>. I know that the error means I should add the <code>lib</code> file in "Additional Dependencies" dialog...  </p>
  
  <p><a href="https://i.stack.imgur.com/kAV9h.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kAV9h.png" alt="enter image description here"></a></p>
  
  <p><strong>But wait... WHAT...?!!</strong><br>
  How does Visual Studio know how to automatically link against this lib file?! Worse yet, how does it know it needs the "debug" version of the library? (With the <code>gd</code> suffix). Also, how does it know I compiled CGAL with VS2013!!??
  At first, I though the project was inheriting properties from some preset property sheets somewhere in my system. But I am certain that's not the case as this behavior shows even with a project created from scratch.</p>
  
  <p>My main question is, how would you force Visual Studio to link against the "Release" version of this library? (eg. <code>CGAL-vc120-mt-4.7.lib</code>)</p>
  
  <p>Side question but related: Am I even linking against the DLL files? How can I be certain that I am in deed doing dynamic linking and not static linking?</p>