# Additional include directories with paraview plugin builder

**URL:** https://discourse.paraview.org/t/additional-include-directories-with-paraview-plugin-builder/8101
**Category:** Development
**Created:** [September 30, 2021, 5:14am UTC](https://discourse.paraview.org/t/additional-include-directories-with-paraview-plugin-builder/8101 "2021-09-30T05:14:33Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![anthomas](https://discourse.paraview.org/user_avatar/discourse.paraview.org/anthomas/32/7342_2.png) [@anthomas](https://discourse.paraview.org/u/anthomas)
#### Post date: [September 30, 2021, 5:14am UTC](https://discourse.paraview.org/t/additional-include-directories-with-paraview-plugin-builder/8101/1 "2021-09-30T05:14:34Z")

</div>

On windows, adding an include directory with include\_directories(path) in cmakelists.txt worked. The same does not work with paraview plugin builder, I have also tried adding it into a plugin.cmake file with no success. How do I add additional include directories when building plugins with pv plugin builder?

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [September 30, 2021, 12:37pm UTC](https://discourse.paraview.org/t/additional-include-directories-with-paraview-plugin-builder/8101/2 "2021-09-30T12:37:52Z")

</div>

please share a failing plugin example and steps to reproduce.

---

<div class="post-metadata">

### Author: ![anthomas](https://discourse.paraview.org/user_avatar/discourse.paraview.org/anthomas/32/7342_2.png) [@anthomas](https://discourse.paraview.org/u/anthomas)
#### Post date: [September 30, 2021, 10:02pm UTC](https://discourse.paraview.org/t/additional-include-directories-with-paraview-plugin-builder/8101/3 "2021-09-30T22:02:57Z")

</div>

I have a qt plugin written in c++ and have source files in a directory called ‘shared’ outside of my plugin directory. On windows, I can include the directory in an ide or in the cmakelists.txt contained in the plugin directory.

In the cmakelists.txt file I have:

```auto
set(SHARED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../shared")
include_directories(${SHARED_DIR})

```

But when I try to build with pv plugin builder (paraview v5.9.0) I get an error saying the file I tried to include was not found.

I have attached a small plugin and the directory I would like to include in the build.  
[pvClone.tar](https://discourse.paraview.org/uploads/short-url/cco1mH2rVtjxl8lxjtqlZFmMpY.tar) (104 KB)

To reproduce build the plugin with pvpluginbuilder by setting the pvOptUMesh directory as the plugin path, while the ‘shared’ directory is contained in the same folder as the pvOptUMesh directory. I built with pv v5.9.0

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [October 1, 2021, 8:26am UTC](https://discourse.paraview.org/t/additional-include-directories-with-paraview-plugin-builder/8101/4 "2021-10-01T08:26:19Z")

</div>

See `Examples/Plugins/ComplexPluginArchitecture` in ParaView source code for an example to do what you want, it include a shared vtk module.

---

<div class="post-metadata">

### Author: ![anthomas](https://discourse.paraview.org/user_avatar/discourse.paraview.org/anthomas/32/7342_2.png) [@anthomas](https://discourse.paraview.org/u/anthomas)
#### Post date: [October 3, 2021, 8:33pm UTC](https://discourse.paraview.org/t/additional-include-directories-with-paraview-plugin-builder/8101/5 "2021-10-03T20:33:16Z")

</div>

I have followed the example and made my ‘shared’ directory a vtk module, when I compile I get an error saying the shared.lib is not found for the vtk module. Any ideas?

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [October 4, 2021, 7:28am UTC](https://discourse.paraview.org/t/additional-include-directories-with-paraview-plugin-builder/8101/6 "2021-10-04T07:28:07Z")

</div>

Please share your failing to build plugin

---

<div class="post-metadata">

### Author: ![anthomas](https://discourse.paraview.org/user_avatar/discourse.paraview.org/anthomas/32/7342_2.png) [@anthomas](https://discourse.paraview.org/u/anthomas)
#### Post date: [October 10, 2021, 7:59pm UTC](https://discourse.paraview.org/t/additional-include-directories-with-paraview-plugin-builder/8101/7 "2021-10-10T19:59:49Z")

</div>

[pvOptAirfoil.zip](https://discourse.paraview.org/uploads/short-url/c7wNDQq32Pa9gTk8vAjCGgpl5vb.zip) (244.9 KB)  
I am building from the pvOptAirfoil directory against paraview superbuild v5.9.1

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [October 11, 2021, 9:04am UTC](https://discourse.paraview.org/t/additional-include-directories-with-paraview-plugin-builder/8101/8 "2021-10-11T09:04:33Z")

</div>

Looking at your shared utils, there is no reason to make it a vtk module, it should just be a lib, so that should be actually easier to do.

---

<div class="post-metadata">

### Author: ![anthomas](https://discourse.paraview.org/user_avatar/discourse.paraview.org/anthomas/32/7342_2.png) [@anthomas](https://discourse.paraview.org/u/anthomas)
#### Post date: [November 1, 2021, 9:51pm UTC](https://discourse.paraview.org/t/additional-include-directories-with-paraview-plugin-builder/8101/9 "2021-11-01T21:51:30Z")

</div>

I am now using many vtk classes in my shared utils, and I believe it makes sense to have a vtk module. It seems to build correctly, but I receive an error when I try to load the shared library:

ERROR: In C:\glr\builds\paraview\paraview-ci\build\superbuild\paraview\src\Remoting\Core\vtkPVPluginLoader.cxx, line 530  
vtkPVPluginLoader (000002C80A3791D0): The specified module could not be found.

The plugin architecture has changed slightly, and is now built from the directory above the shared utils against paraview superbuild 5.9.1. [plugin.zip](https://discourse.paraview.org/uploads/short-url/mn9Qgp2YUlEJCJb75tIb3rGFiyb.zip) (261.5 KB)

Also, you had mentioned I can combine the filters into one plugin. I attempted to do that here but a shared library was generated for each. How do I approach that?

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [November 1, 2021, 11:07pm UTC](https://discourse.paraview.org/t/additional-include-directories-with-paraview-plugin-builder/8101/10 "2021-11-01T23:07:32Z")

</div>

Not sure about your error.

Regarding the number of libraries, each one is geneated for each module.

---

<div class="post-metadata">

### Author: ![anthomas](https://discourse.paraview.org/user_avatar/discourse.paraview.org/anthomas/32/7342_2.png) [@anthomas](https://discourse.paraview.org/u/anthomas)
#### Post date: [November 4, 2021, 2:30am UTC](https://discourse.paraview.org/t/additional-include-directories-with-paraview-plugin-builder/8101/11 "2021-11-04T02:30:21Z")

</div>

I finally was able to get the project to compile with the sharedUtils implemented as a library instead of a vtk module. [plugin.zip](https://discourse.paraview.org/uploads/short-url/diMTg2yMviZwFhwOQqlhF0lzQMg.zip) (261.9 KB)

However, I am still running into the same error “The specified module could not be found” when loading either of the generated shared libraries.  
There is no known cause for this?

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [November 4, 2021, 9:48am UTC](https://discourse.paraview.org/t/additional-include-directories-with-paraview-plugin-builder/8101/12 "2021-11-04T09:48:04Z")

</div>

This would require a much deeper investigation.
