# Where is \_\_VTK\_WRAP\_\_ defined?

**URL:** https://discourse.vtk.org/t/where-is-vtk-wrap-defined/1917
**Category:** Support
**Created:** [October 12, 2019, 4:07am UTC](https://discourse.vtk.org/t/where-is-vtk-wrap-defined/1917 "2019-10-12T04:07:09Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![toddy](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/t/edb3f5/32.png) [@toddy](https://discourse.vtk.org/u/toddy)
#### Post date: [October 12, 2019, 4:07am UTC](https://discourse.vtk.org/t/where-is-vtk-wrap-defined/1917/1 "2019-10-12T04:07:10Z")

</div>

Building from VTK master with MSVC on Windows, **VTK\_WRAP** seems to be defined in vtkWrappingHints.h.

How/where do I turn it off?

If I turn off VTK\_MODULE\_ENABLE\_VTK\_WrappingTools in cmake I get an error  
**cannot open file /lib/vtk/hierarchy/VTK/vtkCommonDataModel-hierarchy.txt**  
**cannot open file /lib/vtk/hierarchy/VTK/vtkCommonExecutionModel-hierarchy.txt**

---

<div class="post-metadata">

### Author: ![dgobbi](https://discourse.vtk.org/user_avatar/discourse.vtk.org/dgobbi/32/18_2.png) [@dgobbi](https://discourse.vtk.org/u/dgobbi)
#### Post date: [October 12, 2019, 1:26pm UTC](https://discourse.vtk.org/t/where-is-vtk-wrap-defined/1917/2 "2019-10-12T13:26:09Z")

</div>

The ` __VTK_WRAP__ ` macro is predefined by the wrapper tools, in vtkParseMain.c:

```
  /* pre-define the __VTK_WRAP__ macro */
  vtkParse_DefineMacro(" __VTK_WRAP__", 0);

```

It is defined when vtkWrapHierarchy or vtkWrapPython are parsing the code, and it is _not_ defined when the C++ compiler is compiling the code.

In other words, in all circumstances where gcc/clang/msvc etc. are compiling the code, it is already off. It will also be off when castxml is reading the code, unless castxml explicitly predefines it.

---

<div class="post-metadata">

### Author: ![toddy](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/t/edb3f5/32.png) [@toddy](https://discourse.vtk.org/u/toddy)
#### Post date: [October 12, 2019, 11:51pm UTC](https://discourse.vtk.org/t/where-is-vtk-wrap-defined/1917/3 "2019-10-12T23:51:30Z")

</div>

Ok. Thanks.

I’m not sure what was going on there as vtk::sizehint was definitely defined when building. Perhaps I added the **VTK\_WRAP** compiler directive to one of the projects manually inside VS. I created a new build folder and started again from scratch, so it’s compiling now.
