title: Qt VS Add-In - link external libraries
body: <p>I want to include external libraries to my visual c++ Qt-add in project. Since my Qt project manager doesn't work I create a simple 'template' project with Qt-creator, and import the .pro file to Visual Studio via the add-in. I've added the commonly used libraries to the pro file in the creator, and with that I can build well, but in Visual Studio building gives me a linker error:</p>
  <pre><code>Error   2   error LNK1104: cannot open file 'OpenCL.lib'    D:\Qt\Qt5.2.0\Tools\QtCreator\bin\qtpnds\LINK
  </code></pre>
  <p>The full .pro file I tried to import:</p>
  <pre><code>#-------------------------------------------------
  #
  # Project created by QtCreator 2013-12-28T17:27:01
  #
  #-------------------------------------------------
  
  QT       += core gui
  
  greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
  
  TARGET = qtpnds
  TEMPLATE = app
  
  
  SOURCES += main.cpp\
          mainwindowpnd.cpp
  
  HEADERS  += mainwindowpnd.h
  
  FORMS    += mainwindowpnd.ui
  
  unix|win32: LIBS += -L$$PWD/C:/Program Files (x86)/Microsoft Visual Studio 11.0/VC/lib/ -lOpenCL
  
  INCLUDEPATH += $$PWD/C:/Program Files (x86)/Microsoft Visual Studio 11.0/VC/include
  DEPENDPATH += $$PWD/C:/Program Files (x86)/Microsoft Visual Studio 11.0/VC/include
  
  unix|win32: LIBS += -L$$PWD/C:/Program Files (x86)/Microsoft Visual Studio 11.0/VC/lib/ -lFreeImage
  
  INCLUDEPATH += $$PWD/C:/Program Files (x86)/Microsoft Visual Studio 11.0/VC/include
  DEPENDPATH += $$PWD/C:/Program Files (x86)/Microsoft Visual Studio 11.0/VC/include
  
  unix|win32: LIBS += -L$$PWD/C:/Program Files (x86)/Microsoft Visual Studio 11.0/VC/lib/ -lglew32
  
  INCLUDEPATH += $$PWD/C:/Program Files (x86)/Microsoft Visual Studio 11.0/VC/include
  DEPENDPATH += $$PWD/C:/Program Files (x86)/Microsoft Visual Studio 11.0/VC/include
  
  unix|win32: LIBS += -L$$PWD/C:/Program Files (x86)/Microsoft Visual Studio 11.0/VC/lib/ -lglut32
  
  INCLUDEPATH += $$PWD/C:/Program Files (x86)/Microsoft Visual Studio 11.0/VC/include
  DEPENDPATH += $$PWD/C:/Program Files (x86)/Microsoft Visual Studio 11.0/VC/include
  </code></pre>
  <p>In creator I can use the library, it works well.</p>
  <h2>Using:</h2>
  <p><strong>Qt 5.2.0 MSVC 2012 /w OpenGL</strong>.. OS: <strong>Windows 7 Ultimate SP1, x64</strong>.. Add-in version: <strong>Qt-VS-Add-In 1.2.2</strong>.. VS: <strong>Visual Studio 2012 Ultimate</strong>.</p>
  <p>Is there any way to link libs in visual studio? <code>#pragma comments</code> and linking via project properties don't work, and I can't/don't know how to edit the .pro file in vs, without having to reimport it everytime I modify it.</p>
  <p>I DID look for solutions, but I've only found posts about Qt-creator.
  <em>For those who might say use Qt-creator instead of addons, I won't.</em></p>
  <p><strong>Edit</strong>:</p>
  <p>My opencl Lib is located in the <code>C:/Program Files (x86)/Microsoft Visual Studio 11.0/VC/lib/</code> folder, and its name is <code>OpenCL.lib</code>. (<code>C:/Program Files (x86)/Microsoft Visual Studio 11.0/VC/lib/OpenCL.lib</code> is the full path). The same for the other libraries. The files and libraries work in Qt-creator!
  The libraries added to the addittional dependencies too.</p>
  <pre><code>OpenCL.lib
  FreeImage.lib
  ...
  </code></pre>
  <p>Without the Qt Add-in the files link well, but after transforming a project to Qt, they cannot be opened. I tried also creating a new .pro file with the add-in.</p>
  <p><strong>Edit2:</strong></p>
  <p>After removing the libs from the additional dependencies, I get unresolved externals for all OpenCL functions. Changing the pro file library paths to:</p>
  <pre><code>-L&quot;C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\lib&quot; -lOpenCL \
  -L&quot;C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\lib&quot; -lFreeImage
  </code></pre>
  <p>does't work too.</p>