title: Link project with ntdll.dll in Visual Studio
body: <p>I've trying to build <strong><a href="https://github.com/LMDB/lmdb" rel="nofollow">lmdb</a></strong> using Visual Studio, but get the following error:</p>
  
  <blockquote>
    <p>mdb.obj : error LNK2001: unresolved external symbol _NtMapViewOfSection@40<br>
    mdb.obj : error LNK2001: unresolved external symbol _NtClose@4<br>
    mdb.obj : error LNK2001: unresolved external symbol _NtCreateSection@28</p>
  </blockquote>
  
  <p>To the first usage of this functions in code there is a following comment:</p>
  
  <pre><code>/* We use native NT APIs to setup the memory map, so that we can
   * let the DB file grow incrementally instead of always preallocating
   * the full size. These APIs are defined in &lt;wdm.h&gt; and &lt;ntifs.h&gt;
   * but those headers are meant for driver-level development and
   * conflict with the regular user-level headers, so we explicitly
   * declare them here. Using these APIs also means we must link to
   * ntdll.dll, which is not linked by default in user code.
   */
  NTSTATUS WINAPI
  NtCreateSection(OUT PHANDLE sh, IN ACCESS_MASK acc,
    IN void * oa OPTIONAL,
    IN PLARGE_INTEGER ms OPTIONAL,
    IN ULONG pp, IN ULONG aa, IN HANDLE fh OPTIONAL);
  </code></pre>
  
  <p>How I need to link ntdll.dll in Visual Studio? I understand, that question is stupid, but I can't find solution within a few hours..</p>