[vtkusers] Problems with vtk and matlab

Corinne Bachmann corinne at sed.ethz.ch
Mon Nov 26 05:03:18 EST 2007


Hi all

I am trying to export data from matlab to a vtk format to be able to
view my data in paraview. It will be a volume with different values to
display.
I was trying the instructions from
http://www.vtk.org/Wiki/VTK/VTKMatlab, but this did not work for me. I
got the following answer:
----------------------------------------------------------------------
>>mex -O -I/usr/local/include/vtk-5.0/ vtkPolyDataRenderer.cpp
-L/usr/local/lib/vtk-5.0 -lvtkFiltering -lvtkRendering

Warning: You are using gcc version "4.2.1".  The earliest gcc version
supported
with mex is "4.0.0".  The latest version tested for use with mex is
"4.2.0".
To download a different version of gcc, visit http://gcc.gnu.org
In file included from /usr/include/c++/4.2.1/backward/strstream:51,
                 from /usr/local/include/vtk-5.0/vtkIOStream.h:36,
                 from /usr/local/include/vtk-5.0/vtkSystemIncludes.h:40,
                 from /usr/local/include/vtk-5.0/vtkIndent.h:24,
                 from /usr/local/include/vtk-5.0/vtkObjectBase.h:43,
                 from /usr/local/include/vtk-5.0/vtkObject.h:41,
                 from /usr/local/include/vtk-5.0/vtkDataObject.h:35,
                 from /usr/local/include/vtk-5.0/vtkDataSet.h:40,
                 from /usr/local/include/vtk-5.0/vtkPointSet.h:29,
                 from /usr/local/include/vtk-5.0/vtkPolyData.h:57,
                 from vtkPolyDataRenderer.cpp:12:
/usr/include/c++/4.2.1/backward/backward_warning.h:32:2: warning:
#warning This file includes at least one deprecated or antiquated
header. Please consider using one of the 32 headers found in section
17.4.1.2 of the C++ standard. Examples include substituting the <X>
header for the <X.h> header for C++ includes, or <iostream> instead of
the deprecated header <iostream.h>. To disable this warning use
-Wno-deprecated.
gcc: ...: No such file or directory

    mex: compile of '/opt/usr/matlab/extern/src/mexversion.c' failed.
----------------------------------------------------------------------------

Do I really need to download an older version of gcc or is there another
way?
Thanks for any help in advance.

Corinne




More information about the vtkusers mailing list