[Paraview-developers] Exclude code from Python wrapping?

Utkarsh Ayachit utkarsh.ayachit at kitware.com
Thu Mar 26 11:28:42 EDT 2015


Don't do the add_definitions() thing. Those don't get propagated when
building the vtkPVClientServerCoreRenderingPython target. Instead, put
that in a configured file like vtkPVConfig.h and just include that in
the header of vtkPVIMageSliceMaper.

Utkarsh

On Thu, Mar 26, 2015 at 11:06 AM, Ken Martin <ken.martin at kitware.com> wrote:
> Anyone know how to suppress wrapping part of a header file?
>
>
>
> I have in  a header file the following code...
>
>
>
> //BTX
>
> #ifndef VTKGL2
>
>   // Description:
>
>   // Get/Set the painter that does the actual rendering.
>
>   void SetPainter(vtkPainter*);
>
>   vtkGetObjectMacro(Painter, vtkPainter);
>
> #endif
>
> //ETX
>
>
>
>
>
> But python in paraview opengl2 is trying to wrap the painter methods as
> below which is causing a compile error.  I define VTKGL2 for the build  ala
>
>
>
> if("${VTK_RENDERING_BACKEND}" STREQUAL "OpenGL2")
>
>   add_definitions(-DVTKGL2)
>
> endif()
>
>
>
> in ParaViewCore/ClientServerCore/Rendering
>
>
>
> ../../../lib/libvtkPVClientServerCoreRenderingPython27D-pv4.3.a(vtkPVImageSliceMapperPython.cxx.o):
> In function `PyvtkPVImageSliceMapper_SetPainter(_object*, _object*)':
>
> vtkPVImageSliceMapperPython.cxx:(.text+0x312): undefined reference to
> `vtkPVImageSliceMapper::SetPainter(vtkPainter*)'
>
> collect2: ld returned 1 exit status
>
>
>
>
>
> Ken Martin PhD
>
> Chairman & CFO
>
> Kitware Inc.
>
> 28 Corporate Drive
>
> Clifton Park NY 12065
>
> ken.martin at kitware.com
>
> 518 881-4901 (w)
>
> 518 371-4573 (f)
>
>
>
> This communication, including all attachments, contains confidential and
> legally privileged information, and it is intended only for the use of the
> addressee.  Access to this email by anyone else is unauthorized. If you are
> not the intended recipient, any disclosure, copying, distribution or any
> action taken in reliance on it is prohibited and may be unlawful. If you
> received this communication in error please notify us immediately and
> destroy the original message.  Thank you.
>
>
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Search the list archives at:
> http://markmail.org/search/?q=Paraview-developers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/paraview-developers
>


More information about the Paraview-developers mailing list