<span class="Apple-style-span" style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255); "><div>Hello fellow developers,</div><div><br></div><div>Recently, I was running into a problem when building VTK with VTK_WRAP_PYTHON checked.</div>

<div><br>CMake found the right python headers and library but build failed giving an error - </div><div><br></div><div><div><font face="'courier new', monospace" color="#ff0000">[  9%] Building CXX object Wrapping/Python/CMakeFiles/vtkPythonCore.dir/PyVTKObject.cxx.o</font></div>

<div><font face="'courier new', monospace" color="#ff0000">~/Projects/VTK/Source-correct-test-failures/Wrapping/Python/PyVTKObject.cxx:381:23: error: expected primary-expression before ‘,’ token</font></div><div>
<font face="'courier new', monospace" color="#ff0000">~/Projects/VTK/Source-correct-test-failures/Wrapping/Python/PyVTKObject.cxx:381:25: error: ‘vtk_weakreflist’ was not declared in this scope</font></div>
<div><font face="'courier new', monospace" color="#ff0000">~/Projects/VTK/Source-correct-test-failures/Wrapping/Python/PyVTKObject.cxx:381:40: error: ‘offsetof’ was not declared in this scope</font></div><div><font face="'courier new', monospace" color="#ff0000">make[2]: *** [Wrapping/Python/CMakeFiles/vtkPythonCore.dir/PyVTKObject.cxx.o] Error 1</font></div>

<div><font face="'courier new', monospace" color="#ff0000">make[1]: *** [Wrapping/Python/CMakeFiles/vtkPythonCore.dir/all] Error 2</font></div><div><font face="'courier new', monospace" color="#ff0000">make: *** [all] Error 2</font></div>

</div><div><br></div><div>I did some digging and found that adding <font face="'courier new', monospace" color="#ff0000">#include <vtksys/cstddef> </font>solved the problem.</div><div><br></div><div>Is that a valid hack or is it something that I am overlooking?</div>

<div><br></div><div>Thanks, </div></span>Sankhesh<br><div><font class="Apple-style-span" face="verdana, sans-serif"><br></font> </div><br>