# What does macro export serve?

**URL:** <https://discourse.vtk.org/t/what-does-macro-export-serve/16055>\
**Category:** Development\
**Created:** [September 23, 2025, 8:40am UTC](https://discourse.vtk.org/t/what-does-macro-export-serve/16055 "2025-09-23T08:40:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![CsatiZoltan](https://discourse.vtk.org/user_avatar/discourse.vtk.org/csatizoltan/32/6040_2.png) [@CsatiZoltan](https://discourse.vtk.org/u/CsatiZoltan)\
**Post date:** [September 23, 2025, 8:40am UTC](https://discourse.vtk.org/t/what-does-macro-export-serve/16055/1 "2025-09-23T08:40:29Z")

</div>

I am developing a VTK module. In the VTK and ParaView examples, and even in the VTK code base, I encounter

```cpp
#include "<yourModule>Module.h" // for export macro

```

I noticed that this header is not in the code base, but is generated. What does it serve? In my experience, the module works fine without it.

---

<div class="post-metadata">

**Author:** ![mwestphal](https://discourse.vtk.org/user_avatar/discourse.vtk.org/mwestphal/32/19_2.png) [@mwestphal](https://discourse.vtk.org/u/mwestphal)\
**Post date:** [September 23, 2025, 9:15am UTC](https://discourse.vtk.org/t/what-does-macro-export-serve/16055/2 "2025-09-23T09:15:29Z")

</div>

> What does it serve?

It contains export macro for Windows: [\_\_declspec | Microsoft Learn](https://learn.microsoft.com/en-us/cpp/cpp/declspec?view=msvc-170)

> the module works fine without it.

You are problably using linux ?

---

<div class="post-metadata">

**Author:** ![CsatiZoltan](https://discourse.vtk.org/user_avatar/discourse.vtk.org/csatizoltan/32/6040_2.png) [@CsatiZoltan](https://discourse.vtk.org/u/CsatiZoltan)\
**Post date:** [September 23, 2025, 9:21am UTC](https://discourse.vtk.org/t/what-does-macro-export-serve/16055/3 "2025-09-23T09:21:58Z")

</div>

Yes, I am on Linux.
