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

Santiago Serebrinsky sserebrinsky at gmail.com
Mon Oct 8 18:52:24 CEST 2018


I guessed so, given that I got

  gmsh-git-Windows64-sdk.zip

and gmsh-4.0.dll is inside it.
Having Win 10, I need a 64-bit version.
Now, checking gmsh-4.0.dll, I used a couple of alternative methods:

1. As per https://stackoverflow.com/a/495365/2707864 I used

  $ file gmsh-4.0.dll
  gmsh-4.0.dll: PE32+ executable (DLL) (GUI) x86-64 (stripped to external
PDB), for MS Windows

I guess PE32+ corresponds to 64 bit.

2. I used https://github.com/lucasg/Dependencies v1.8

It seems to indicate that gmsh-4.0.dll depends on many 32 bit dlls, so I
wouldn't be sure.



On Sun, Oct 7, 2018 at 1:08 PM Christophe Geuzaine <cgeuzaine at uliege.be>
wrote:

>
>
> > On 7 Oct 2018, at 17:25, 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?
> >
>
> Are you sure you use the correct 32/64 bit version?
>
> >
> >
> >
> > _______________________________________________
> > gmsh mailing list
> > gmsh at onelab.info
> > http://onelab.info/mailman/listinfo/gmsh
>
>> Prof. Christophe Geuzaine
> University of Liege, Electrical Engineering and Computer Science
> http://www.montefiore.ulg.ac.be/~geuzaine
>
> Free software: http://gmsh.info | http://getdp.info | http://onelab.info
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://onelab.info/pipermail/gmsh/attachments/20181008/a4eb70d2/attachment.html>


More information about the gmsh mailing list