Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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>)" 
(??0MainWindow@@QAE@PAVQWidget@@V?$QFlags@W4WindowType@Qt@@@@@Z)
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 !!

Regards

Jonathan

share|improve this question

1 Answer 1

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

 
discard

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.