Hi, you need to add vtkIOExport to your module dependencies, i.e. “PACKAGE_DEPENDS PRIVATE VTK|vtkIOExport”. Best, Stefan
From: Ivaylo Angelov [mailto:ivaylo_ange...@gmx.de] Sent: Friday, September 6, 2019 6:31 PM To: mitk-userslists.sourceforge.net <mitk-users@lists.sourceforge.net<mailto:mitk-users@lists.sourceforge.net>> Subject: [mitk-users] error using vtkOBJExporter Dear all, I am trying to export some polydata I have to a wavefront OBJ file and am having problems finding the proper way to do that. I found the possibility of using the <vtkOBJExporter> online, but for some reason it always throws an error on building. I declare it in my header as follows: >>>>> vtkOBJExporter *exporter; The strategy would be the following in my cpp file: >>>>> exporter = vtkOBJExporter::New(); //throws error >>>>> exporter->SetRenderWindow(m_renderWindow->GetVtkRenderWindow()); >>>>> //m_renderWindow is a properly working rendering window I use >>>>> exporter->SetFilePrefix("INSERT FILE PREFIX"); >>>>> exporter->Write(); Anyhow, the first line throws the following error: error LNK2019: unresolved external symbol "__declspec(dllimport) public: static class vtkOBJExporter * __cdecl vtkOBJExporter::New(void)" (__imp_?New@vtkOBJExporter@@SAPEAV1@XZ) referenced in function "protected: void __cdecl NRRDWindow::on_objButton(void)" (?on_objButton@NRRDWindow@@IEAAXXZ) 1>C:\MITK\MITK_superbuild\MITK-build\bin\Release\MitkStep6.exe : fatal error LNK1120: 1 unresolved externals I have included the necessary header, IntelliSense also automatically finds it and I've tracked it on my PC... so it's there and should work. Given that this is the only possibility I've found by now, I would appreciate your help ... There are sources where they use a "vtkOBJWriter", but that one does not appear for me (I have vtk 8.1, by the way). If there also are other options, I would appreciate you telling me. I hope someone can help me on that and look forward to hearing from you. Kind regards, Ivaylo Angelov
_______________________________________________ mitk-users mailing list mitk-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mitk-users