FlorianRhiem / pyGLFW

Python bindings for GLFW
MIT License
233 stars 36 forks source link

Support for Windows #6

Closed crackwitz closed 9 years ago

crackwitz commented 9 years ago

glfw.py, line 140: add this:

if _glfw is None:
    _glfw = ctypes.CDLL("glfw3.dll")

I can't make much sense of the detection code that's there. It looks like it should pick up a .dll, but it didn't.

FlorianRhiem commented 9 years ago

I mostly work on Linux and OS X. As far as I know ctypes.CDLL works a good bit different on Windows. Please verify whether 219c551 solves the problem for you.

crackwitz commented 9 years ago

219c551 works (for me ;). Thanks!

CDLL just picks it up from any path in %PATH%. That's normal behavior for Windows.

FlorianRhiem commented 9 years ago

Great. Yeah, I thought so. I wrote that detection code as ctypes.CDLL did not find the library by name alone. Oddly I just tried it on OS X and linux and it seemed to work. I'll look into it the next couple of days and maybe I can toss out most of the detection code and just try a couple of the common library names. Thank you!