# Linking ParaView modules into plugins

**URL:** https://discourse.paraview.org/t/linking-paraview-modules-into-plugins/5553
**Category:** Development
**Created:** [October 12, 2020, 9:13pm UTC](https://discourse.paraview.org/t/linking-paraview-modules-into-plugins/5553 "2020-10-12T21:13:46Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![coreylee](https://discourse.paraview.org/user_avatar/discourse.paraview.org/coreylee/32/14039_2.png) [@coreylee](https://discourse.paraview.org/u/coreylee)
#### Post date: [October 12, 2020, 9:13pm UTC](https://discourse.paraview.org/t/linking-paraview-modules-into-plugins/5553/1 "2020-10-12T21:13:46Z")

</div>

Hello!

I am waist deep in plugin development right now and I came across a behavior in ParaView plugin building that I’m not super clear on. I have an example plugin where I have taken the `/Examples/Plugins/PropertyWidgets` and added an interactive widget (just a simple HandlePropertyWidget with slight modifications). In building this plugin for ParaView 5.8, the `paraview.plugin` file includes all the modules related to ParaView Qt interaction (and probably way more than I need for this plugin)  
NAME  
PropertyWidgets  
DESCRIPTION  
An example plugin with an added handle widget example.  
REQUIRES\_MODULES  
ParaView::pqCore  
ParaView::pqWidgets  
ParaView::pqComponents  
ParaView::pqApplicationComponents  
ParaView::RemotingServerManager  
ParaView::RemotingViews  
VTK::CommonDataModel  
VTK::CommonExecutionModel  
VTK::CommonTransforms  
VTK::FiltersGeometry  
VTK::FiltersSources  
VTK::RenderingCore  
VTK::InteractionWidgets  
VTK::CommonCore  
VTK::FiltersCore  
VTK::FiltersGeneral

But when I go to build the plugin, I get linker errors that all the symbols related to the `pqInteractivePropertyWidget` cannot be found! to fix this, I modified the line `find_package(ParaView REQUIRED)` to

```
find_package(ParaView REQUIRED COMPONENTS pqCore
pqWidgets
pqComponents
pqApplicationComponents
RemotingServerManager
RemotingViews)

link_libraries(ParaView::pqCore
ParaView::pqWidgets
ParaView::pqComponents
ParaView::pqApplicationComponents
ParaView::RemotingServerManager
ParaView::RemotingViews)

```

and this collected all the symbols and the plugin built and now runs correctly. My question is: Why did adding the ParaView components to the `paraview.plugin` NOT link the requisite pq objects?

Thanks in advance!

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.paraview.org/u/ben.boeckel)
#### Post date: [October 13, 2020, 12:39pm UTC](https://discourse.paraview.org/t/linking-paraview-modules-into-plugins/5553/2 "2020-10-13T12:39:51Z")

</div>

`REQUIRES_MODULES` does not automatically link anything within the plugin APIs. This is because plugins might be XML and not link anything at all. The fix is to do `target_link_libraries(PropertyWidgets PRIVATE ParaView::…)` in the associated `CMakeLists.txt`. The list is there to basically manage the enabled set of modules and hide plugins that are not possible or (as ParaView itself uses it) to turn on modules that enabled plugins require.
