[Qgis-developer] Re: VS 2008 link errors for QMetaObkects references

G. Allegri giohappy at gmail.com
Fri Apr 16 19:30:41 EDT 2010


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...

1 - I've set up a project for VS 2008, setting also the CORE_EXPORT and
GUI_EXPORT definitions.
2 - I've set the various include and lib folders and dependencies.
3 - it compiles everything, but link fails

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?

I would appreciate your help. I'm right moving my first steps in the C++
environment...

thanks again,
Giovanni

2010/4/16 G. Allegri <giohappy at gmail.com>

> I have a problem while building a c++ plugin with msvc 9 (VS 2008) on
> windows xp.
>
> during linking I receive various errors referring to QMetaObject references
> like
>
> *public: static struct QMetaObject const QgisInterface::staticMetaObject"
> (?staticMetaObject at QgisInterface@@2UQMetaObject@@B)*
>
> I set the following lib folders
> C:\Osgeo4w\apps\qgis_dev\lib
> C:\Osgeo4w\lib
>
> and the dipendencies (first trial was without the complete path for qt):
> kernel32.lib
> user32.lib
> gdi32.lib
> winspool.lib
> shell32.lib
> ole32.lib
> oleaut32.lib
> uuid.lib
> comdlg32.lib
> advapi32.lib
> qgis_core.lib
> qgis_gui.lib
> geos_c_i.lib
> C:\OSGeo4W\lib\qtmain.lib
> C:\OSGeo4W\lib\QtXml4.lib
> C:\OSGeo4W\lib\QtCore4.lib
> C:\OSGeo4W\lib\QtGui4.lib
> C:\OSGeo4W\lib\QtNetwork4.lib
> C:\OSGeo4W\lib\QtSvg4.lib
> C:\OSGeo4W\lib\proj.lib
> C:\OSGeo4W\lib\geos_c_i.lib
> C:\OSGeo4W\lib\gdal_i.lib
> C:\OSGeo4W\lib\iconv.lib
>
>
> 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.
> The general configurations are the same as the one generated by cmake for
> the other qgis dlls.
>
> Has anybody faced this problem?
> thanks,
> giovanni
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/qgis-developer/attachments/20100417/575ecb07/attachment.html


More information about the Qgis-developer mailing list