Hi,

I am trying to link an application using QGIS API. Everything works on Linux but in Windows (QT 4.8.1 + Visual Studio Express 2010) I get:

Qt Code:
  1. 1>maptoolselect.obj : error LNK2001: unresolved external symbol "public: static struct QMetaObject const QgsVectorLayer::staticMetaObject" (?staticMetaObject@QgsVectorLayer@@2UQMetaObject@@B)
  2. 1>mapwidget.obj : error LNK2001: unresolved external symbol "public: static struct QMetaObject const QgsVectorLayer::staticMetaObject" (?staticMetaObject@QgsVectorLayer@@2UQMetaObject@@B)
  3. 1>mapwidget.obj : error LNK2001: unresolved external symbol "public: static struct QMetaObject const QgsRasterLayer::staticMetaObject" (?staticMetaObject@QgsRasterLayer@@2UQMetaObject@@B)
  4. 1>debug\\nile.exe : fatal error LNK1120: 2 unresolved externals
To copy to clipboard, switch view to plain text mode 

my pro file is defined as:

Qt Code:
  1. QT += core gui sql xml
  2.  
  3. TARGET = nile
  4. TEMPLATE = app
  5.  
  6. unix:INCLUDEPATH += /usr/local/gis/include/qgis /usr/local/gis/include ./mapviewsrc
  7. win32:INCLUDEPATH += C:/QGIS/apps/qgis/include C:/QGIS/include ./mapviewsrc
  8.  
  9. unix:LIBS += -L/usr/local/gis/lib -lgdal -lgeos -lqgis_core -lqgis_gui
  10. win32:LIBS += C:/QGIS/apps/qgis/lib/qgis_core.lib C:/QGIS/apps/qgis/lib/qgis_gui.lib C:/QGIS/lib/geos_c_i.lib C:/QGIS/lib/gdal_i.lib
  11.  
  12. CONFIG += release
  13.  
  14. DEFINES += QGISPLUGINDIR=$${QGISPLUGINDIR} CORE_EXPORT= GUI_EXPORT=
To copy to clipboard, switch view to plain text mode 

I tried to generate a Visual Studio project with
Qt Code:
  1. qmake -tp vc
To copy to clipboard, switch view to plain text mode 

but I get the same error.

Any help is much appreciated!.

Carlos