[pypy-dev] Extension compiler and external DLLs

laurent destriau laurent.destriau at gmail.com
Fri Aug 25 22:05:02 CEST 2006

I would like to use pypy/bin/compilemodule.py to compile some of my code,
which uses OpenGL.
I am wondering why the following does not work (Link error on glEnd) :

    from ctypes import windll

    glEnd = windll.opengl32.glEnd
    glEnd.restype = None

    def DrawSomething(space):

While this does compile fine:

    from pypy.rpython.rctypes.tool import ctypes_platform
    from pypy.rpython.rctypes.tool.libc import libc
    from ctypes import *

    time_t = ctypes_platform.getsimpletype('time_t', '#include <time.h>',
    time = libc.time
    time.argtypes = [POINTER(time_t)]
    time.restype = time_t

    def DrawLine(space):

Any help would be much appreciated.

Laurent Destriau
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pypy-dev/attachments/20060825/7d343b70/attachment.html>

More information about the Pypy-dev mailing list