# GmshCommon - A .NET/CLI wrapper for Gmsh

**URL:** <https://prepomax.discourse.group/t/gmshcommon-a-net-cli-wrapper-for-gmsh/999>\
**Category:** General Questions\
**Created:** [July 25, 2023, 8:40am UTC](https://prepomax.discourse.group/t/gmshcommon-a-net-cli-wrapper-for-gmsh/999 "2023-07-25T08:40:48Z")\
**Posts on this page:** 4\
**Page:** 2

<div class="post-metadata">

**Author:** ![tsvilans](https://yyz2.discourse-cdn.com/free1/user_avatar/prepomax.discourse.group/tsvilans/32/516_2.png) [@tsvilans](https://prepomax.discourse.group/u/tsvilans)\
**Post date:** [August 16, 2023, 12:19pm UTC](https://prepomax.discourse.group/t/gmshcommon-a-net-cli-wrapper-for-gmsh/999/21 "2023-08-16T12:19:47Z")

</div>

Yes, good idea.

C/C++:

`/Yu"pch.h" /ifcOutput "x64\Debug\" /GS /W3 /Zc:wchar_t /I"C:\git\gmsh_common\src\..\deps\gmsh-4.11.1-Windows64-sdk\include" /Zi /Od /Fd"x64\Debug\vc143.pdb" /Zc:inline /fp:precise /D "_DEBUG" /D "_WINDLL" /D "_UNICODE" /D "UNICODE" /errorReport:prompt /WX- /Zc:forScope /clr /FU"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.8\mscorlib.dll" /FU"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.8\System.Data.dll" /FU"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.8\System.dll" /FU"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.8\System.Xml.dll" /MDd /FC /Fa"x64\Debug\" /EHa /nologo /Fo"x64\Debug\" /Fp"x64\Debug\GmshCommon.pch" /diagnostics:column`

… and linker:

`/OUT:"C:\git\gmsh_common\src\..\bin\GmshCommon.dll" /MANIFEST /NXCOMPAT /PDB:"C:\git\gmsh_common\src\..\bin\GmshCommon.pdb" /DYNAMICBASE "gmsh.lib" /FIXED:NO /DEBUG:FULL /DLL /MACHINE:X64 /INCREMENTAL /PGD:"C:\git\gmsh_common\src\..\bin\GmshCommon.pgd" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /ManifestFile:"x64\Debug\GmshCommon.dll.intermediate.manifest" /LTCGOUT:"x64\Debug\GmshCommon.iobj" /ERRORREPORT:PROMPT /ILK:"x64\Debug\GmshCommon.ilk" /NOLOGO /LIBPATH:"C:\git\gmsh_common\src\..\deps\gmsh-4.11.1-Windows64-sdk\lib" /ASSEMBLYDEBUG /TLBID:1`

Except for the obvious differences in path, I don’t see any differences… I ran it through a diff checker and everything.

Any chance the lib would be blocked?

---

<div class="post-metadata">

**Author:** ![Matej](https://avatars.discourse-cdn.com/v4/letter/m/a698b9/32.png) [@Matej](https://prepomax.discourse.group/u/Matej)\
**Post date:** [August 17, 2023, 7:28am UTC](https://prepomax.discourse.group/t/gmshcommon-a-net-cli-wrapper-for-gmsh/999/22 "2023-08-17T07:28:56Z")

</div>

I have no idea any more. I checked, and the lib is not blocked. I noticed that by default, I only had support for C# installed in Visual Studio. So when I opened your project, Visual Studio offered to add support for C++. I added the default support, but maybe some parts are missing. I will check this now and report back.

---

<div class="post-metadata">

**Author:** ![Matej](https://avatars.discourse-cdn.com/v4/letter/m/a698b9/32.png) [@Matej](https://prepomax.discourse.group/u/Matej)\
**Post date:** [August 26, 2023, 10:00am UTC](https://prepomax.discourse.group/t/gmshcommon-a-net-cli-wrapper-for-gmsh/999/23 "2023-08-26T10:00:34Z")

</div>

After some time and with some help, I was able to solve the problem. In the Gmsh SDK Readme.txt file it is written that when using Visual Studio the gmsh.h in the SDK file should be switched with the gmsh.h\_cwrap file:

gmsh.h → gmsh.h\_original  
gmsh.h\_cwrap → gmsh.h

After this the compilation goes through without a problem. Maybe adding this info to the GmshCommon project would help for other users.

---

<div class="post-metadata">

**Author:** ![tsvilans](https://yyz2.discourse-cdn.com/free1/user_avatar/prepomax.discourse.group/tsvilans/32/516_2.png) [@tsvilans](https://prepomax.discourse.group/u/tsvilans)\
**Post date:** [August 26, 2023, 5:29pm UTC](https://prepomax.discourse.group/t/gmshcommon-a-net-cli-wrapper-for-gmsh/999/24 "2023-08-26T17:29:34Z")

</div>

Oh man, I completely forgot about this step… I did it once when I installed the Gmsh SDK and then didn’t think about it. Good find! I’ll add it to the GmshCommon readme.

[Previous page](https://prepomax.discourse.group/t/gmshcommon-a-net-cli-wrapper-for-gmsh/999.md?page=1)
