[Gmsh] Using the Python API under Win 10 + Msys2

Santiago Serebrinsky sserebrinsky at gmail.com
Tue Oct 9 08:27:40 CEST 2018


(This means to fix a mess-up with a couple of emails and their subject)

I was suggested by Christophe to check if I was using the right dll version
(32 or 64 bit) here http://onelab.info/pipermail/gmsh/2018/012508.html

Given that I am using Win 10, and 64-bit versions for all my apps
(including Gmsh 4), I guessed I had to use the 64-bit version of the Gmsh
API dll as well.

So I checked that, and I had the 64-bit version (hinted at here
http://onelab.info/pipermail/gmsh/2018/012515.html and later confirmed).

But then I simply tried using the 32-bit version, and it worked!
I wouldn't know why.


On Mon, Oct 8, 2018 at 4:51 AM Santiago Serebrinsky <sserebrinsky at gmail.com>
wrote:

> Hi all,
>
> I mean to use the Gmsh Python API under Win 10 / Msys2 (from PortableApps).
> To get this right, I added
>
> elif platform.system() == 'MSYS_NT-10.0-WOW':
>     lib = CDLL(os.path.join(libdir, "gmsh-4.0.dll"))
>
> But then I get
>
> >>> import api_gmsh
>
> /c/Users/ry16205/Documents/soft-hard-ware/science_math_visualization/gmsh/python
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
>   File
> "/c/Users/ry16205/Documents/soft-hard-ware/science_math_visualization/gmsh/python/api_gmsh.py",
> line 30, in <module>
>     lib = CDLL(os.path.join(libdir, "gmsh-4.0.dll"))
>   File "/usr/lib/python3.6/ctypes/__init__.py", line 343, in __init__
>     self._handle = _dlopen(self._name, mode)
> OSError: Exec format error
>
> What would the right way of doing this be?
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://onelab.info/pipermail/gmsh/attachments/20181009/c5e468bb/attachment.html>


More information about the gmsh mailing list