[Gmsh] Having problems linking gmsh sdk libraries

Max Orok morok at mevex.com
Sun Jul 29 23:33:50 CEST 2018


Hello Longhui,

Not a VS expert but have you tried using the cwrap versions of these files?
I got it to work on Windows with that method.
It is explained nicely here:
https://gitlab.onelab.info/gmsh/gmsh/tree/master/api

The following is taken from the relevant readme.md file:

"The additional file `gmsh.h_cwrap' redefines the C++ API in terms of the C
API.
This is provided as a convenience for users of the binary Gmsh SDK whose C++
compiler ABI is not compatible with the ABI of the C++ compiler used to
create
the SDK. To use these C++ bindings of the C API instead of the native C++
API,
simply rename `gmsh.h_cwrap' as `gmsh.h'. Note that this will lead to
(slightly)
reduced performance compared to using the native Gmsh C++ API, as it entails
additional data copies between the C++ wrapper, the C API and the native C++
code."

The libgmsh.dll is essential for sure, not sure about the .lib. I also had
to put the gmsh-3.0.dll in the same folder as my executable.
And if not, there's always Python!

Good luck!
Max Orok

On Sun, Jul 29, 2018 at 10:55 AM, Li Longhui <lilonghui at hotmail.com> wrote:

> Greetings,
>
>
>
> This is Longhui.
>
>
>
> I am evaluating the gmsh sdks with C/C++ on windows, and having problems
> linking the SDK libraries.
>
>
>
> I am wondering if some experts can have a look?  Thanks.
>
>
>
> Here are what I have done
>
> 1.     In Visual Studio 2015, create a function as below
>
>
>
> 2.     Configure the sdk include path and the sdk library path
>
>
>
> The codes can be built without compiling errors, but having linkage errors
>
>
>
> I have tried with both 32-bit and 64-bit sdks, and they have behaved
> exactly same.
>
>
>
> Should I have the Can I have the two files
>
> libgmsh.dll
>
> libgmsh.lib
>
>
>
> Do we need a libgmsh.dll and libgmsh.lib file?
>
>
>
> Any advices will be greatly appreciated/
>
>
>
> Thanks Much,
>
> Longhui
>
> _______________________________________________
> gmsh mailing list
> gmsh at onelab.info
> http://onelab.info/mailman/listinfo/gmsh
>
>


-- 
Max Orok
Summer Student
www.mevex.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://onelab.info/pipermail/gmsh/attachments/20180729/704d2f54/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image007.jpg
Type: image/jpeg
Size: 24557 bytes
Desc: not available
URL: <http://onelab.info/pipermail/gmsh/attachments/20180729/704d2f54/attachment-0002.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image004.jpg
Type: image/jpeg
Size: 19432 bytes
Desc: not available
URL: <http://onelab.info/pipermail/gmsh/attachments/20180729/704d2f54/attachment-0003.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 10886 bytes
Desc: not available
URL: <http://onelab.info/pipermail/gmsh/attachments/20180729/704d2f54/attachment-0001.png>


More information about the gmsh mailing list