Are you linking vtkCommon and vtkFiltering as well?<br><br><div class="gmail_quote">On Thu, Oct 14, 2010 at 7:32 PM, Gib Bogle <span dir="ltr">&lt;<a href="mailto:g.bogle@auckland.ac.nz">g.bogle@auckland.ac.nz</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">I have built VTK libraries statically, with MSVS 2005.  I&#39;m having trouble linking the libraries to my Qt application.  I have included in the build all the VTK libraries that seem to be possibly needed (using Dependency Walker), but still I get these errors:<br>


<br>
1&gt;myvtk.obj : error LNK2019: unresolved external symbol &quot;__declspec(dllimport) public: static class vtkBMPWriter * __cdecl vtkBMPWriter::New(void)&quot; (__imp_?New@vtkBMPWriter@@SAPAV1@XZ) referenced in function &quot;public: void __thiscall MyVTK::saveSnapshot(class QString,class QString)&quot; (?saveSnapshot@MyVTK@@QAEXVQString@@0@Z)<br>


1&gt;myvtk.obj : error LNK2019: unresolved external symbol &quot;__declspec(dllimport) public: static class vtkTIFFWriter * __cdecl vtkTIFFWriter::New(void)&quot; (__imp_?New@vtkTIFFWriter@@SAPAV1@XZ) referenced in function &quot;public: void __thiscall MyVTK::saveSnapshot(class QString,class QString)&quot; (?saveSnapshot@MyVTK@@QAEXVQString@@0@Z)<br>


1&gt;myvtk.obj : error LNK2019: unresolved external symbol &quot;__declspec(dllimport) public: static class vtkJPEGWriter * __cdecl vtkJPEGWriter::New(void)&quot; (__imp_?New@vtkJPEGWriter@@SAPAV1@XZ) referenced in function &quot;public: void __thiscall MyVTK::saveSnapshot(class QString,class QString)&quot; (?saveSnapshot@MyVTK@@QAEXVQString@@0@Z)<br>


1&gt;myvtk.obj : error LNK2019: unresolved external symbol &quot;__declspec(dllimport) public: static class vtkPNGWriter * __cdecl vtkPNGWriter::New(void)&quot; (__imp_?New@vtkPNGWriter@@SAPAV1@XZ) referenced in function &quot;public: void __thiscall MyVTK::saveSnapshot(class QString,class QString)&quot; (?saveSnapshot@MyVTK@@QAEXVQString@@0@Z)<br>


1&gt;myvtk.obj : error LNK2019: unresolved external symbol &quot;__declspec(dllimport) public: void __thiscall vtkWindowToImageFilter::SetInput(class vtkWindow *)&quot; (__imp_?SetInput@vtkWindowToImageFilter@@QAEXPAVvtkWindow@@@Z) referenced in function &quot;public: void __thiscall MyVTK::saveSnapshot(class QString,class QString)&quot; (?saveSnapshot@MyVTK@@QAEXVQString@@0@Z)<br>


1&gt;myvtk.obj : error LNK2019: unresolved external symbol &quot;__declspec(dllimport) public: static class vtkTextSource * __cdecl vtkTextSource::New(void)&quot; (__imp_?New@vtkTextSource@@SAPAV1@XZ) referenced in function &quot;public: static class vtkSmartPointer&lt;class vtkTextSource&gt; __cdecl vtkSmartPointer&lt;class vtkTextSource&gt;::New(void)&quot; (?New@?$vtkSmartPointer@VvtkTextSource@@@@SA?AV1@XZ)<br>


1&gt;myvtk.obj : error LNK2019: unresolved external symbol &quot;__declspec(dllimport) public: static class vtkWindowToImageFilter * __cdecl vtkWindowToImageFilter::New(void)&quot; (__imp_?New@vtkWindowToImageFilter@@SAPAV1@XZ) referenced in function &quot;public: __thiscall MyVTK::MyVTK(class QWidget *)&quot; (??0MyVTK@@QAE@PAVQWidget@@@Z)<br>


1&gt;myvtk.obj : error LNK2019: unresolved external symbol &quot;__declspec(dllimport) public: int __thiscall vtkCellArray::InsertNextCell(class vtkCell *)&quot; (__imp_?InsertNextCell@vtkCellArray@@QAEHPAVvtkCell@@@Z) referenced in function &quot;public: __thiscall MyVTK::MyVTK(class QWidget *)&quot; (??0MyVTK@@QAE@PAVQWidget@@@Z)<br>


1&gt;myvtk.obj : error LNK2019: unresolved external symbol &quot;__declspec(dllimport) public: static class vtkCylinderSource * __cdecl vtkCylinderSource::New(void)&quot; (__imp_?New@vtkCylinderSource@@SAPAV1@XZ) referenced in function &quot;public: __thiscall MyVTK::MyVTK(class QWidget *)&quot; (??0MyVTK@@QAE@PAVQWidget@@@Z)<br>


1&gt;myvtk.obj : error LNK2019: unresolved external symbol &quot;__declspec(dllimport) public: static class vtkSphereSource * __cdecl vtkSphereSource::New(void)&quot; (__imp_?New@vtkSphereSource@@SAPAV1@XZ) referenced in function &quot;public: __thiscall MyVTK::MyVTK(class QWidget *)&quot; (??0MyVTK@@QAE@PAVQWidget@@@Z)<br>


1&gt;release\bone_GUI.exe : fatal error LNK1120: 10 unresolved externals<br>
<br>
Looking at the errors for the image writers (vtkBMPWriter etc), for example, I&#39;m puzzled because I have included vtkIO.lib and vtkjpeg.lib, vtkpng.lib, vtktiff.lib and vtkzlib.lib.  What am I missing?<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
</blockquote></div><br>