GmshCommon - A .NET/CLI wrapper for Gmsh

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?

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.

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.

2 Likes

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.