title: unresolved external symbol __imp__scanf referenced in function _main
body: <p>I compile a driver with visual studio 2008 and I get this error:  </p>
  
  <pre><code>unresolved external symbol __imp__scanf referenced in function _main  
  </code></pre>
  
  <p>I don't use any lib and the main function look like this:</p>
  
  <pre><code>__cdecl main {
  
    .....
    scanf(...);
  
  }
  </code></pre>
  
  <p>Note: I have other errors with other native functions such as:   </p>
  
  <pre><code>unresolved external symbol __imp__printf referenced in function _main  
  unresolved external symbol __imp__GetLastError@0 referenced in function _main
  unresolved external symbol __imp__CreateFileA@28 referenced in function _main
  ...  
  </code></pre>
  
  <p>The discussion <a href="https://stackoverflow.com/questions/3704374/linking-error-lnk2019-in-msvc-unresolved-symbols-with-imp-prefix-but-shoul">here</a> is not like my problem </p>
  
  <p>Update:  </p>
  
  <p>I'm compiling a driver with WinDDK, I have pute the line in the <strong>sources</strong> file:</p>
  
  <pre><code>TARGETLIBS= $(SDK_LIB_PATH)\kernel32.lib  
  </code></pre>
  
  <p>and much errors begin with <strong>unresolved external symbol __imp__</strong> are clean except those: __scanf and _printf. So what lib I must add to fixe them?<br>
  Thanks</p>