[vtkusers] VTK 6.0 with Visual Studio

Joseph Melnyk JMelnyk at pile.com
Mon Jul 22 14:45:57 EDT 2013


I'm attempting to port an existing code base from VTK 5.10 to 6.0.  This code base has existed and worked happily with VTK 5.x for a few years now, being built with Visual Studio 2008.  When I began the port to 6.0, I followed the migration guide found here: http://www.vtk.org/Wiki/VTK/VTK_6_Migration_Guide and the code builds and links just fine.  However, when I run it, I'm getting access violation exceptions (attempts to read/write protected memory) when I try instantiating with New().  Researching further, I see that this problem is mentioned here: http://www.vtk.org/Wiki/VTK/VTK_6_Migration/Factories_now_require_defines  HOWEVER I'm not getting NULL objects with the New() call, I'm getting exceptions.  Furthermore, it doesn't happen with every VTK object; some instantiate and can be used just fine.  Nonetheless, I tried the suggestions at the second link, regarding definition of VTK AUTOINIT, and they proved fruitless.  So I'm currently at a loss...

For what it's worth, I'm building VTK with CMAKE and the only options I'm changing from the default configuration are the following:
- build shared libs
- don't build TESTING
- set custom install directory

Thanks for your time; any help would be greatly appreciated...
Joseph Melnyk

__Scanned by MessageLabs



More information about the vtkusers mailing list