[vtkusers] compile tests or examples

Jacinto Perez jacintoperez at mail.com
Mon Jun 11 11:24:09 EDT 2012


A a, .. yes.. i have version 5.10.. that is why so.. 
 Do you know the new method for this?

 I just build all the examples with cmake.. could it be that only some examples are built? Because in the web there are a lot of examples and in this case, for example in folder Examples/Annotation I have only Cxx/LabeledMesh example.
 And what about all the tests.. I turn on the flag to build them, but I don't have it I think. Or I don't know where they are.


 Sorry for this basic questions, but I am starting with this.
 After building all the examples.. to run them, what I have to do?

 thank you very much!

----- Original Message -----
From: Anka Kochanowska
Sent: 06/11/12 04:18 PM
To: Jacinto Perez
Subject: Re: [vtkusers] compile tests or examples

 Yes, you will have examples in the bin directory of your build. 
 I thought, you were only interested in some examples, that's why I suggested making your own CMakeLists.txt.

 You have compile errors - check the code. 
 Have you taken your example from the same version of vtk as your build?
 in 5.10 vtkPolyDataMapper2D does not have member SetInputData().

 Anka

 On Mon, Jun 11, 2012 at 9:57 AM, Jacinto Perez < jacintoperez at mail.com > wrote:
Hello, I tried copying CMakeLists for other examples.. but when running make, gives me this error..

Scanning dependencies of target labeledMesh
 /[100%] Building CXX object CMakeFiles/labeledMesh.dir// /labeledMesh.cxx.o/

 //home/Applications// /TESTS/labeledMesh/labeledMesh./ /cxx:15:3: error: expected unqualified-id before numeric constant/

 //home/Applications// /TESTS/labeledMesh/labeledMesh./ /cxx: In function ‘int main(int, char**)’:/

 //home/Applications// /TESTS/labeledMesh/labeledMesh./ /cxx:117:15: error: ‘class vtkPolyDataMapper2D’ has no member named ‘SetInputData’/

 /make[2]: *** [CMakeFiles/labeledMesh.dir// /labeledMesh.cxx.o] Error 1/

 /make[1]: *** [CMakeFiles/labeledMesh.dir// /all] Error 2/

 /make: *** [all] Error 2/
 /I tried with another example.. VtkLinearSelector3d and gives me a similar error.. maybe they are old?/

 /[100%] Building CXX object CMakeFiles// /TestLinearSelector3D.dir// /TestLinearSelector3D.cxx.o/

 //home/Applications// /TESTS/TestLinearSelector3D// /TestLinearSelector3D.cxx: In function ‘int CheckExtractedUGrid(/ /vtkExtractSelection*, const char*, int, bool)’:/

 //home/Applications// /TESTS/TestLinearSelector3D// /TestLinearSelector3D.cxx:109:/ /15: error: ‘class vtkUnstructuredGridWriter’ has no member named ‘SetInputData’/

 //home/Applications// /TESTS/TestLinearSelector3D// /TestLinearSelector3D.cxx: In function ‘int TestLinearSelector3D(int, char**)’:/

 //home/Applications// /TESTS/TestLinearSelector3D// /TestLinearSelector3D.cxx:144:/ /8: error: ‘class vtkLinearSelector’ has no member named ‘SetInputData’/

 //home/Applications// /TESTS/TestLinearSelector3D// /TestLinearSelector3D.cxx:152:/ /8: error: ‘class vtkExtractSelection’ has no member named ‘SetInputData’/

 //home/Applications// /TESTS/TestLinearSelector3D// /TestLinearSelector3D.cxx:164:/ /8: error: ‘class vtkLinearSelector’ has no member named ‘SetInputData’/

 //home/Applications// /TESTS/TestLinearSelector3D// /TestLinearSelector3D.cxx:172:/ /8: error: ‘class vtkExtractSelection’ has no member named ‘SetInputData’/

 //home/Applications// /TESTS/TestLinearSelector3D// /TestLinearSelector3D.cxx:190:/ /8: error: ‘class vtkLinearSelector’ has no member named ‘SetInputData’/

 //home/Applications// /TESTS/TestLinearSelector3D// /TestLinearSelector3D.cxx:197:/ /8: error: ‘class vtkExtractSelection’ has no member named ‘SetInputData’/

 //home/Applications// /TESTS/TestLinearSelector3D// /TestLinearSelector3D.cxx:215:/ /8: error: ‘class vtkLinearSelector’ has no member named ‘SetInputData’/

 //home/Applications// /TESTS/TestLinearSelector3D// /TestLinearSelector3D.cxx:222:/ /8: error: ‘class vtkExtractSelection’ has no member named ‘SetInputData’/

 /make[2]: *** [CMakeFiles// /TestLinearSelector3D.dir// /TestLinearSelector3D.cxx.o] Error 1/

 /make[1]: *** [CMakeFiles// /TestLinearSelector3D.dir/all] Error 2/
 /make: *** [all] Error 2/
The CmakeLists.txt are like this..

cmake_minimum_required(VERSION 2.8)PROJECT( /TestLinearSelector3D/)find_package(VTK REQUIRED)include(${VTK_USE_FILE})if(APPLE)add_executable( /TestLinearSelector3D/ MACOSX_BUNDLE  /TestLinearSelector3D/.cxx)else()add_executable( /TestLinearSelector3D/ /TestLinearSelector3D/.cxx)endif()if(VTK_LIBRARIES)target_link_libraries( /TestLinearSelector3D/${VTK_LIBRARIES})else()target_link_libraries( /TestLinearSelector3D/ vtkHybrid )endif()


I have already installed vtk on my pc.. I will try configuring again with cmake and turning on that flags.. but then, what happens? I have them all ready to execute?
 Thank you!



----- Original Message -----
From: Bill Lorensen
Sent: 06/11/12 02:45 PM
To: Jacinto Perez
Subject: Re: [vtkusers] compile tests or examples

 When you configure your vtk with cmake, turn on BUILD_TESTING and BUILD_EXAMPLES. On Mon, Jun 11, 2012 at 8:31 AM, Jacinto Perez < jacintoperez at mail.com > wrote: > Hello! > > One question. In the examples that are on the wiki pages, each one comes > with its cmakelists.txt .. > What about the tests and examples that are in the class documentation? > > For example this one > : http://vtk.org/gitweb?p=VTK.git;a=blob;f=Filters/General/Testing/Cxx/BoxClipPolyData.cxx  > > Is there a special way to compile them , or to use them? > > Than you for the help! > _______________________________________________ > Powered by http://www.kitware.com  > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html  > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ  > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers  > -- Unpaid intern in BillsBasement at noware dot com

 _______________________________________________
 Powered by http://www.kitware.com 

 Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html 

 Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ 

 Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120611/e837a757/attachment.htm>


More information about the vtkusers mailing list