Somewhere I've read that this problem can be related to missing *.moc files. The ones from the plugin I'm testing get compiled, but now I wonder if I'm following the corect steps to link things together...<br><br>
1 - I've set up a project for VS 2008, setting also the CORE_EXPORT and GUI_EXPORT definitions.<br>2 - I've set the various include and lib folders and dependencies.<br>3 - it compiles everything, but link fails<br>
<br>I'm not expert with build systems, and I wonder wether this process is ok to build a qgis plugin, or it's necessary to set the project inside the global qgis build project to make it work. I thought that having the *.lib and the headers from qgis would have been enough... Am I wrong?<br>
<br>I would appreciate your help. I'm right moving my first steps in the C++ environment...<br><br>thanks again,<br>Giovanni<br><br><div class="gmail_quote">2010/4/16 G. Allegri <span dir="ltr"><<a href="mailto:giohappy@gmail.com">giohappy@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">I have a problem while building a c++ plugin with msvc 9 (VS 2008) on windows xp.<br><br>during linking I receive various errors referring to QMetaObject references like <br>
<br>*public: static struct QMetaObject const QgisInterface::staticMetaObject" (?staticMetaObject@QgisInterface@@2UQMetaObject@@B)*<br>
<br>I set the following lib folders<br>C:\Osgeo4w\apps\qgis_dev\lib<br>C:\Osgeo4w\lib<br><br>and the dipendencies (first trial was without the complete path for qt):<br>kernel32.lib<br>user32.lib<br>gdi32.lib<br>winspool.lib<br>
shell32.lib<br>ole32.lib<br>oleaut32.lib<br>uuid.lib<br>comdlg32.lib<br>advapi32.lib<br>qgis_core.lib<br>qgis_gui.lib<br>geos_c_i.lib<br>C:\OSGeo4W\lib\qtmain.lib<br>C:\OSGeo4W\lib\QtXml4.lib<br>C:\OSGeo4W\lib\QtCore4.lib<br>
C:\OSGeo4W\lib\QtGui4.lib<br>C:\OSGeo4W\lib\QtNetwork4.lib<br>C:\OSGeo4W\lib\QtSvg4.lib<br>C:\OSGeo4W\lib\proj.lib<br>C:\OSGeo4W\lib\geos_c_i.lib<br>C:\OSGeo4W\lib\gdal_i.lib<br>C:\OSGeo4W\lib\iconv.lib<br><br><br>I don't understand what the linker needs to resolve that... I see that this specific symbol is exported by qgis_gui.dll... and it's there.<br>
The general configurations are the same as the one generated by cmake for the other qgis dlls.<br><br>Has anybody faced this problem?<br>thanks,<br>giovanni<br>
</blockquote></div><br>