Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm developping a software using QGIS. When building my software there is a LINK error.

1>mainwindow.obj : error LNK2019: symbole externe non résolu "public: __thiscall 
   QgsLegend::QgsLegend(class QgsMapCanvas *,class QWidget *,char const 
   *)"(??0QgsLegend@@QAE@PAVQgsMapCanvas@@PAVQWidget@@PBD@Z) référencé dans la 
   fonction "public: __thiscall MainWindow::MainWindow(class QWidget *,class 
   QFlags<enum Qt::WindowType>)" 
1>C:\Documents and Settings\XXXXX\mes documents\visual studio 2010\Projects\XXXXX
\XXXXXX.exe : fatal error LNK1120: 1 externes non résolus

I'm using QGIS 1.7.2, QT 4.7.3, Visual Studio 2010 (with VC10), and there were no errors when I built the sources of QGIS. I've already put all the .libs i found in the link editor of VS10. In QGIS API, it is written that for the QgsLegend, I had to link the qgis_gui.lib, so had I.

I don't know what I can do now. Can someone help me ? Or how to proceed in order to find the lib i missed.

If you need more informations, just ask. I'm really blocked...

Thank you in advance for the help !!



share|improve this question

QgsLegend isn't part of the API. You can't use it in applications. Plugins can access it via QgsLegendInterface.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.