+++ Wookey [2014-06-11 02:29 +0100]:

This is the the current vtk6 support patch, which sorts the library
linking issues, and part of the update to the API, but it's not right
because it's doesn't build properly.

Recording the current state in case anyone else (with some C++ clue) can help.

The build fails with:
c++ -c -Wall -D_GNU_SOURCE -DLOCH -DLXLINUX 
-I/usr/lib/x86_64-linux-gnu/wx/include/gtk2-unicode-3.0 -I/usr/include/wx-3.0 
-D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread 
-I/usr/include/freetype2 -I/usr/include/vtk-6.1  -o .././loch/lxData.o 
lxData.cxx
lxData.cxx: In member function 'void lxData::Rebuild()':
lxData.cxx:538:28: error: 'class vtkPolyDataNormals' has no member named 
'SetInput'
   this->scrapWallsNormals->SetInput(this->scrapWalls);
                            ^
lxData.cxx:546:19: error: 'class vtkAppendPolyData' has no member named 
'AddInput'
   this->allWalls->AddInput(this->lrudWalls);
                   ^
lxData.cxx:554:24: error: 'class vtkPolyDataNormals' has no member named 
'SetInput'
  this->surfaceNormals->SetInput(this->surface);
                        ^
lxData.cxx: In member function 'void lxData::ExportVTK(wxString)':
lxData.cxx:580:6: error: 'class vtkPolyDataWriter' has no member named 
'SetInput'
   w->SetInput(this->allWallsStripped->GetOutput());
      ^
make[2]: *** [.././loch/lxData.o] Error 1
Makefile:112: recipe for target '.././loch/lxData.o' failed

----------------------
Which means I've got the changes I made for the new API wrong. Clues welcome.



Wookey
-- 
Principal hats:  Linaro, Emdebian, Wookware, Balloonboard, ARM
http://wookware.org/
Description: Update vtk usage for VTK6
 VTK6 removes support for SetInput method. Replace with SetInputData,
 following http://www.vtk.org/Wiki/VTK/VTK_6_Migration/Replacement_of_SetInput
 
Author: Wookey <woo...@debian.org>
Bug-Debian: http://bugs.debian.org/750088
Forwarded: no
Last-Update: <2014-06-02>

Index: therion-5.3.15/loch/lxData.cxx
===================================================================
--- therion-5.3.15.orig/loch/lxData.cxx
+++ therion-5.3.15/loch/lxData.cxx
@@ -542,20 +542,20 @@ void lxData::Rebuild()
 
   // COUNTER needed
   this->allWalls->RemoveAllInputs();
-  this->allWalls->AddInput(this->scrapWallsNormals->GetOutput());
+  this->allWalls->AddInputConnection(this->scrapWallsNormals->GetOutputPort());
   this->allWalls->AddInput(this->lrudWalls);
   this->allWalls->Update();
-  this->allWallsTriangle->SetInput(this->allWalls->GetOutput());
-  this->allWallsSorted->SetInput(this->allWallsTriangle->GetOutput());
+  this->allWallsTriangle->SetInputConnection(this->allWalls->GetOutputPort());
+  this->allWallsSorted->SetInputConnection(this->allWallsTriangle->GetOutputPort());
   this->allWallsSorted->Update();
-  this->allWallsStripped->SetInput(this->allWallsTriangle->GetOutput());
+  this->allWallsStripped->SetInputConnection(this->allWallsTriangle->GetOutputPort());
   this->allWallsStripped->Update();
 
 	this->surfaceNormals->SetInput(this->surface);
 	this->surfaceNormals->SetFeatureAngle(360);
 	this->surfaceNormals->Update();
-  this->surfaceTriangle->SetInput(this->surfaceNormals->GetOutput());
-  this->surfaceSorted->SetInput(this->surfaceTriangle->GetOutput());
+  this->surfaceTriangle->SetInputConnection(this->surfaceNormals->GetOutputPort());
+  this->surfaceSorted->SetInputConnection(this->surfaceTriangle->GetOutputPort());
   this->surfaceSorted->Update();
 
   sWpoints->Delete();
Index: therion-5.3.15/loch/Makefile
===================================================================
--- therion-5.3.15.orig/loch/Makefile
+++ therion-5.3.15/loch/Makefile
@@ -38,11 +38,12 @@ STRIPFLAG = -s
 CXX = c++
 CC = gcc
 POBJECTS = lxR2P.o
-VTKLIBS = -lvtkHybrid -lvtkImaging -lvtkIO -lvtkGraphics -lvtkFiltering -lvtkCommon
+VTK5LIBS = -lvtkHybrid -lvtkImaging -lvtkIO -lvtkGraphics -lvtkFiltering -lvtkCommon
+VTK6LIBS = -lvtkCommonCore -lvtkCommonDataModel -lvtkFiltersCore -lvtkFiltersHybrid -lvtkIOLegacy -lvtkjpeg -lvtkpng
 CXXPFLAGS = -DLXLINUX $(shell wx-config --cxxflags) $(shell freetype-config --cflags) -I$(VTKPATH)
 CCPFLAGS = -DLXLINUX  $(shell wx-config --cflags)
 LXLIBDIR = linux
-PLIBS = $(shell wx-config --libs --gl-libs) $(VTKLIBS) -lfreetype -lpthread -lz $(shell pkg-config --libs libpng glu) -ljpeg -lX11
+PLIBS = $(shell wx-config --libs --gl-libs) $(VTK6LIBS) -lfreetype -lpthread -lz $(shell pkg-config --libs libpng glu) -ljpeg -lX11
 LXPLATFORM = LINUX
 
 # PLATFORM WIN32

Reply via email to