title: LNK2019 unresolved external symbol _CrtDbgReport referenced in function _CRT_RTC_INIT SDL2
body: <p>I am trying to get <a href="https://github.com/nvMcJohn/apitest" rel="noreferrer">apitest</a> compiled..</p>
  
  <p>cloned and <code>cmake -G "Visual Studio 14 2015 Win64" ..</code> as instructed, everything ok</p>
  
  <p>First problem, a lot of this, I don't get even the error list:</p>
  
  <pre><code>error LNK2019: unresolved external symbol _CrtDbgReport referenced in function _CRT_RTC_INIT
  </code></pre>
  
  <p>Gogled, and they say to switch </p>
  
  <p>Project Properties -> Configuration Properties -> C/C++ -> Code Generation -> Runtime Library </p>
  
  <p>from Multi-threaded DLL to Multi-threaded Debug DLL</p>
  
  <p>Ok, I try to build again, it fails again, but at least this time I get the error list..</p>
  
  <p>Again my friend:</p>
  
  <pre><code>Severity    Code    Description Project File    Line    Suppression State
  Error   LNK2019 unresolved external symbol _CrtDbgReport referenced in function _CRT_RTC_INIT   SDL2    C:\Users\GBarbieri\Documents\Visual Studio 2015\Projects\apitest\_out\thirdparty\SDL2-2.0.1\MSVCRTD.lib(_init_.obj) 1   
  </code></pre>
  
  <p>This <a href="https://stackoverflow.com/questions/33577341/visual-studio-2015-c-and-assembly-not-building">answer</a> says the project is being linked with only part of the C runtime (CRT) libary, <code>msvcrtd.lib</code>. I also need to link with the libraries <code>vcruntimed.lib</code> and <code>ucrtd.lib</code>. </p>
  
  <p>Good, but how?</p>
  
  <p>The apitest is a solution based on many projects, I guess I have to manually add something into the SDL2 one. I tried a lot of attempts, especially under Linker -> Input -> Additional Dependencies, but I never got it working</p>
  
  <p>I found <code>msvcrtd.lib</code> under <code>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\lib</code> although I guess the solution is trying to build its own.</p>
  
  <p>I found <code>vcruntimed.lib</code> under the same place as <code>msvcrtd.lib</code>. Instead <code>ucrtd.lib</code> is located under <code>C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\ucrt\x64</code></p>
  
  <p>Thanks in advance..</p>
  
  <p>Ps: I have VS15 Community Edition</p>