[vtkusers] Problems with vtk and matlab

Dominik Szczerba domi at vision.ee.ethz.ch
Mon Nov 26 05:37:13 EST 2007


Yes, the first thing I would try is the older version of gcc. If you are on 
linux this is trivial, just make sure the older version is installed in the 
system (easy on most platforms) and edit the mex configuration script to 
replace gcc / g++ with things like gcc-4.0 or so.
On Windows I have no idea, but can not imagine this is not possible.
Note, this limitation comes from Matlab.
bye
-- Dominik

On Monday 26 November 2007 11.03:18 Corinne Bachmann wrote:
> 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
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers



-- 
Dominik Szczerba, Ph.D.
Computer Vision Lab CH-8092 Zurich
http://www.vision.ee.ethz.ch/~domi



More information about the vtkusers mailing list