The USE_SYSTEM flags are meant for linking in system installed/externally built versions of these libraries. On Linux/Mac you can easily install 'development' versions of these libraries using their respective package managers and then configure the USE_SYSTEM flags to point to those libraries instead. On Windows you would have to build those libraries by hand so don't worry about the USE_SYSTEM options.<div>
<br></div><div>Anyway, I am not entirely sure if link order matters but you might try putting vtkCommon and vtkFiltering before vtkIO as nearly everything in VTK depends on vtkCommon/vtkFiltering.</div><div><br><div class="gmail_quote">
On Thu, Oct 14, 2010 at 7:43 PM, Gib Bogle <span dir="ltr"><<a href="mailto:g.bogle@auckland.ac.nz" target="_blank">g.bogle@auckland.ac.nz</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Maybe it's an issue with how I built the VTK libraries. I wasn't sure if I should select VTK_USE_SYSTEM_PNG, _JPEG,_ZLIB and _TIFF, so I didn't. In general I don't understand these VTK_USE_SYSTEM_* flags.<div>
<br>
<br>
On 15/10/2010 12:35 p.m., Dave Partyka wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>
Are you linking vtkCommon and vtkFiltering as well?<br>
<br>
On Thu, Oct 14, 2010 at 7:32 PM, Gib Bogle <<a href="mailto:g.bogle@auckland.ac.nz" target="_blank">g.bogle@auckland.ac.nz</a><br></div><div><div></div><div>
<mailto:<a href="mailto:g.bogle@auckland.ac.nz" target="_blank">g.bogle@auckland.ac.nz</a>>> wrote:<br>
<br>
I have built VTK libraries statically, with MSVS 2005. I'm having trouble<br>
linking the libraries to my Qt application. I have included in the build<br>
all the VTK libraries that seem to be possibly needed (using Dependency<br>
Walker), but still I get these errors:<br>
<br>
1>myvtk.obj : error LNK2019: unresolved external symbol<br>
"__declspec(dllimport) public: static class vtkBMPWriter * __cdecl<br>
vtkBMPWriter::New(void)" (__imp_?New@vtkBMPWriter@@SAPAV1@XZ) referenced in<br>
function "public: void __thiscall MyVTK::saveSnapshot(class QString,class<br>
QString)" (?saveSnapshot@MyVTK@@QAEXVQString@@0@Z)<br>
1>myvtk.obj : error LNK2019: unresolved external symbol<br>
"__declspec(dllimport) public: static class vtkTIFFWriter * __cdecl<br>
vtkTIFFWriter::New(void)" (__imp_?New@vtkTIFFWriter@@SAPAV1@XZ) referenced<br>
in function "public: void __thiscall MyVTK::saveSnapshot(class QString,class<br>
QString)" (?saveSnapshot@MyVTK@@QAEXVQString@@0@Z)<br>
1>myvtk.obj : error LNK2019: unresolved external symbol<br>
"__declspec(dllimport) public: static class vtkJPEGWriter * __cdecl<br>
vtkJPEGWriter::New(void)" (__imp_?New@vtkJPEGWriter@@SAPAV1@XZ) referenced<br>
in function "public: void __thiscall MyVTK::saveSnapshot(class QString,class<br>
QString)" (?saveSnapshot@MyVTK@@QAEXVQString@@0@Z)<br>
1>myvtk.obj : error LNK2019: unresolved external symbol<br>
"__declspec(dllimport) public: static class vtkPNGWriter * __cdecl<br>
vtkPNGWriter::New(void)" (__imp_?New@vtkPNGWriter@@SAPAV1@XZ) referenced in<br>
function "public: void __thiscall MyVTK::saveSnapshot(class QString,class<br>
QString)" (?saveSnapshot@MyVTK@@QAEXVQString@@0@Z)<br>
1>myvtk.obj : error LNK2019: unresolved external symbol<br>
"__declspec(dllimport) public: void __thiscall<br>
vtkWindowToImageFilter::SetInput(class vtkWindow *)"<br>
(__imp_?SetInput@vtkWindowToImageFilter@@QAEXPAVvtkWindow@@@Z) referenced in<br>
function "public: void __thiscall MyVTK::saveSnapshot(class QString,class<br>
QString)" (?saveSnapshot@MyVTK@@QAEXVQString@@0@Z)<br>
1>myvtk.obj : error LNK2019: unresolved external symbol<br>
"__declspec(dllimport) public: static class vtkTextSource * __cdecl<br>
vtkTextSource::New(void)" (__imp_?New@vtkTextSource@@SAPAV1@XZ) referenced<br>
in function "public: static class vtkSmartPointer<class vtkTextSource><br>
__cdecl vtkSmartPointer<class vtkTextSource>::New(void)"<br>
(?New@?$vtkSmartPointer@VvtkTextSource@@@@SA?AV1@XZ)<br>
1>myvtk.obj : error LNK2019: unresolved external symbol<br>
"__declspec(dllimport) public: static class vtkWindowToImageFilter * __cdecl<br>
vtkWindowToImageFilter::New(void)"<br>
(__imp_?New@vtkWindowToImageFilter@@SAPAV1@XZ) referenced in function<br>
"public: __thiscall MyVTK::MyVTK(class QWidget *)"<br>
(??0MyVTK@@QAE@PAVQWidget@@@Z)<br>
1>myvtk.obj : error LNK2019: unresolved external symbol<br>
"__declspec(dllimport) public: int __thiscall<br>
vtkCellArray::InsertNextCell(class vtkCell *)"<br>
(__imp_?InsertNextCell@vtkCellArray@@QAEHPAVvtkCell@@@Z) referenced in<br>
function "public: __thiscall MyVTK::MyVTK(class QWidget *)"<br>
(??0MyVTK@@QAE@PAVQWidget@@@Z)<br>
1>myvtk.obj : error LNK2019: unresolved external symbol<br>
"__declspec(dllimport) public: static class vtkCylinderSource * __cdecl<br>
vtkCylinderSource::New(void)" (__imp_?New@vtkCylinderSource@@SAPAV1@XZ)<br>
referenced in function "public: __thiscall MyVTK::MyVTK(class QWidget *)"<br>
(??0MyVTK@@QAE@PAVQWidget@@@Z)<br>
1>myvtk.obj : error LNK2019: unresolved external symbol<br>
"__declspec(dllimport) public: static class vtkSphereSource * __cdecl<br>
vtkSphereSource::New(void)" (__imp_?New@vtkSphereSource@@SAPAV1@XZ)<br>
referenced in function "public: __thiscall MyVTK::MyVTK(class QWidget *)"<br>
(??0MyVTK@@QAE@PAVQWidget@@@Z)<br>
1>release\bone_GUI.exe : fatal error LNK1120: 10 unresolved externals<br>
<br>
Looking at the errors for the image writers (vtkBMPWriter etc), for example,<br>
I'm puzzled because I have included vtkIO.lib and vtkjpeg.lib, vtkpng.lib,<br>
vtktiff.lib and vtkzlib.lib. What am I missing?<br>
_______________________________________________<br></div></div>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a> <<a href="http://www.kitware.com" target="_blank">http://www.kitware.com</a>><div><br>
<br>
Visit other Kitware open-source projects at<br>
<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:<br>
<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>
<br>
<br>
</div></blockquote>
</blockquote></div><br></div>