# About building GmshIO plugin

**URL:** https://discourse.paraview.org/t/about-building-gmshio-plugin/9805
**Category:** ParaView Support
**Created:** [June 14, 2022, 4:45am UTC](https://discourse.paraview.org/t/about-building-gmshio-plugin/9805 "2022-06-14T04:45:41Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Cam](https://discourse.paraview.org/user_avatar/discourse.paraview.org/cam/32/8343_2.png) [@Cam](https://discourse.paraview.org/u/Cam)
#### Post date: [June 14, 2022, 4:45am UTC](https://discourse.paraview.org/t/about-building-gmshio-plugin/9805/1 "2022-06-14T04:45:41Z")

</div>

Dear ParaView community,

I would like to use Gmsh API in ParaView. There are two official plugins: GmshIO and GmshReader. Looking at the commit history, I understand GmshReader is now depreciated (But it seems like not all the features from GmshReader have been merged to GmshIo yet.).  
To build GmshIO,

1. git clone [gmsh / gmsh · GitLab](http://gitlab.onelab.info/gmsh/gmsh.git). And built it using cmake

```auto
cmake 
-DCMAKE_BUILD_TYPE=Release 
-DCMAKE_INSTALL_PREFIX=/path_to_gmsh_install_dir/ 
-DENABLE_BUILD_SHARED=ON 
-DENABLE_BUILD_LIB=ON 
-DDEFAULT=0 
-DENABLE_POST=ON 
-DENABLE_PARSER=ON 
-DENABLE_PRIVATE_API=ON 
../gmsh-source

```

1. Configure in ParaView

```auto
"Gmsh_INCLUDE_DIR": "<path>/Gmsh_build/include"
"Gmsh_LIBRARY": "<path>/Gmsh_build/lib/gmsh.lib"

```

The build succeeded. I can launch ParaView but unable to load GmshIo plugin. I got

```auto
ERROR: In ...\vtkPVPluginLoader.cxx, line 536
vtkPVPluginLoader (000001F11049B770): .../GmshIO.dll: The specified module could not be found."

```

If I move _gmsh.dll_ to my ParaView bin directory, the error disappeared and I can load GmshIO. I thought Gmsh is built as part of GmshIO as static library. Why do I still have to copy and move `gmsh.dll`?

---

<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: [June 14, 2022, 6:51am UTC](https://discourse.paraview.org/t/about-building-gmshio-plugin/9805/3 "2022-06-14T06:51:14Z")

</div>

Add `path_to_gmsh_install_dir/bin` to your `PATH` or compile Gmsh statically.

---

<div class="post-metadata">

### Author: ![Cam](https://discourse.paraview.org/user_avatar/discourse.paraview.org/cam/32/8343_2.png) [@Cam](https://discourse.paraview.org/u/Cam)
#### Post date: [June 14, 2022, 4:37pm UTC](https://discourse.paraview.org/t/about-building-gmshio-plugin/9805/4 "2022-06-14T16:37:41Z")

</div>

How to compile GmshIO statically?

---

<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: [June 15, 2022, 8:58am UTC](https://discourse.paraview.org/t/about-building-gmshio-plugin/9805/5 "2022-06-15T08:58:50Z")

</div>

You need to compile Gmsh statically:

```auto
cmake 
-DCMAKE_BUILD_TYPE=Release 
-DCMAKE_INSTALL_PREFIX=/path_to_gmsh_install_dir/ 
-DENABLE_BUILD_SHARED=OFF 
-DENABLE_BUILD_LIB=ON 
-DDEFAULT=0 
-DENABLE_POST=ON 
-DENABLE_PARSER=ON 
-DENABLE_PRIVATE_API=ON 
../gmsh-source

```

---

<div class="post-metadata">

### Author: ![Cam](https://discourse.paraview.org/user_avatar/discourse.paraview.org/cam/32/8343_2.png) [@Cam](https://discourse.paraview.org/u/Cam)
#### Post date: [June 15, 2022, 10:11pm UTC](https://discourse.paraview.org/t/about-building-gmshio-plugin/9805/6 "2022-06-15T22:11:41Z")

</div>

Static build is successful with -DENABLE\_BUILD\_SHARED=OFF
