title: unresolved external symbol "__declspec(dllimport)
body: <p>I am trying to get libqglviewer to work in visual studio, I have installed Qt5.2.0 64-bit for VS 2012.</p>
  
  <p>I have added the include directories for QGLViewer and QT in the project settings together with the lib-directory and the lib-files for qt (both Release and Debug). </p>
  
  <p>I have a simple example code to test it:</p>
  
  <pre><code>main.cpp
  #include "simpleViewer.h"
  #include &lt;qapplication.h&gt;
  
  int main(int argc, char** argv)
  {
   // Read command lines arguments.
   QApplication application(argc,argv);
  
   // Instantiate the viewer.
   /* Viewer viewer;
  
  
   viewer.setWindowTitle("simpleViewer");
  
  
  // Make the viewer window visible on screen.
   viewer.show();
  
  // Run main loop.
   return application.exec();*/
  }
  
  
  simpleViewer.h
  #include &lt;QGLViewer/qglviewer.h&gt;
  
  class Viewer : public QGLViewer
  {
  protected :
  virtual void draw();
  virtual void init();
  virtual QString helpString() const;
  };
  </code></pre>
  
  <p>When I try to compile it I get</p>
  
  <pre><code> main.obj : error LNK2001: unresolved external symbol "_declspec(dllimport) public: virtual class QString __cdecl QGLViewer::mouseBindingsString(void)const " (__imp_?mouseBindingsString@QGLViewer@@UEBA?AVQString@@XZ)
  </code></pre>
  
  <p>Plenty of them. I have looked around, but I cannot understand what the error is.</p>
  
  <p>If I comment out everything except <code>QApplication(argc,argv)</code> it compiles, but if I uncomment Viewer viewer I get a lot of errors. I don't see what is missing since it compiles when I only use QApplication.</p>
  
  <p>It feels like there is something missing with the linking, but I have added all .lib files I can find.</p>
  
  <p>One thing is that if I download the libQGLViewer and run the following</p>
  
  <pre><code>qmake -t vclib QGLViewer.pro -spec win32-msvc2013
  </code></pre>
  
  <p>and then opens it in Visual Studio 2013 ( I changed today without success) it builds and generates the QGLViewer2.dll files as it should according to the instruction on libQGLViewers homepage. But if I try the simpleViewer example it gives the same problems again. </p>