[vtkusers] Compiling HelloWorld and other qt based examples - vtk-5.10.0

David Doria daviddoria at gmail.com
Wed Aug 29 10:40:46 EDT 2012

On Wed, Aug 29, 2012 at 10:36 AM, Billy Araujo <billyaraujo at gmail.com>wrote:

> I get the following link problem compiling vtk 5.10 with QT support. I
> configured the project with cmake and I am using VS 2010.
> Error 1 error LNK2019: unresolved external symbol "__declspec(dllimport)
> public: class QImage & __thiscall QImage::operator=(class QImage &&)"
> (__imp_??4QImage@@QAEAAV0@$$QAV0@@Z) referenced in function "public:
> virtual void __thiscall vtkQtLabelRenderStrategy::RenderLabel(int *
> const,class vtkTextProperty *,class vtkUnicodeString)"
> (?RenderLabel at vtkQtLabelRenderStrategy@@UAEXQAHPAVvtkTextProperty@
> @VvtkUnicodeString@@@Z)
> D:\Libraries\VTK\vtk-5.10.0\Build\msvc10\Examples\Infovis\Cxx\vtkRendering.lib(vtkQtLabelRenderStrategy.obj)
> HelloWorld
> I got similar problem with GeovisCxxTests. I changed linking order and it
> solved it.
> Any ideas?

Are you linking to QVTK as in this example?

Please show us your CMakeLists.txt file.

For Geovis, as long as you have built VTK with VTK_USE_GEOVIS=ON, you
should just need to link to the standard ${VTK_LIBRARIES} in the
target_link_libraries call.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120829/23666f78/attachment.htm>

More information about the vtkusers mailing list