Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes to DLL search in Python 3.8 break things #10

Open
eufren opened this issue May 19, 2020 · 0 comments · May be fixed by #11
Open

Changes to DLL search in Python 3.8 break things #10

eufren opened this issue May 19, 2020 · 0 comments · May be fixed by #11

Comments

@eufren
Copy link

eufren commented May 19, 2020

Attempting to do XFoil() after a successful installation makes ctypes complain that it can't find the temp .dll or dependencies.

I worked around this by adding:

def __init__(self):
        super().__init__()
        tmp = NamedTemporaryFile(mode='wb', delete=False, suffix=lib_ext)
        tmp.close()
        self._lib_path = tmp.name
        copy2(lib_path, self._lib_path)
        os.add_dll_directory(r"C:\Windows\System32")
        os.add_dll_directory(r"C:\Users\euana\Documents\Perl\c\bin")
        self._lib = cdll.LoadLibrary(self._lib_path)
        self._lib.init()
        self._airfoil = None
@eufren eufren linked a pull request May 19, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant