title: Qt: windows functions are unresolved external symbols
body: <p>I'm trying to compile a simple helloworld-like non-Qt C++ application using te WinAPI in QtCreator. Here's the code:</p>
  
  <pre><code>#include &lt;windows.h&gt;
  
  int main()
  {
      HWND cons = GetConsoleWindow();
      SetWindowText(cons, L"I am the console window");
      MessageBox(cons, L"Hello world!", L"I am the MessageBox", MB_OK | MB_ICONERROR);
      return 0;
  }
  </code></pre>
  
  <p>Looks very simple, but when I've tried to build it, the compilation fails with:</p>
  
  <pre><code>main.obj:-1: error: LNK2019: unresolved external symbol __imp__MessageBoxW@16 referenced in function _main
  main.obj:-1: error: LNK2019: unresolved external symbol __imp__SetWindowTextW@8 referenced in function _main
  </code></pre>
  
  <p>I started to seek, and I found <a href="https://stackoverflow.com/questions/19336325/unresolved-linker-errors-for-many-windows-functions-in-qt">this</a>, but it wasn't helping me at all, because when I had written this:</p>
  
  <pre><code>LIBS += -L"C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v7.0A\\Lib"
  </code></pre>
  
  <p>and even this:</p>
  
  <pre><code>LIBS += -L"C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v7.0A\\Lib\\shell32.lib"
  </code></pre>
  
  <p>in my <code>.pro</code>, these "symbols" still stand unresolved. I ran qmake after <strong>each change</strong> to the <code>.pro</code>-file contents. So, any ideas?</p>