[IronPython] IronPython ctypes on Linux

Dino Viehland dinov at microsoft.com
Tue Jul 28 00:36:19 CEST 2009


Is there one library name to rule them all on Linux, Mac OS/X, FreeBSD,
etc?  (either common on all the OSes or something coming from a Mono
mapping?)

> -----Original Message-----
> From: users-bounces at lists.ironpython.com [mailto:users-
> bounces at lists.ironpython.com] On Behalf Of Slide
> Sent: Monday, July 27, 2009 3:23 PM
> To: Discussion of IronPython
> Subject: Re: [IronPython] IronPython ctypes on Linux
>
> #include <dlfcn.h>
>
> void *dlopen(const char *filename, int flag);
>
> char *dlerror(void);
>
> void *dlsym(void *handle, const char *symbol);
>
> int dlclose(void *handle);
>
> Not quite the same as LoadLibrary.
>
> On Mon, Jul 27, 2009 at 3:13 PM, Dino Viehland<dinov at microsoft.com>
> wrote:
> > If we just aliased LoadLibrary to dlopen will that work?
> >
> > My hope was that we could basically rely upon Mono's P/Invoke mapping
> > to handle running ctypes on Linux.  But maybe LoadLibrary/dlopen have
> > slightly different sigs and we need to handle that one specially.
> >
> >> -----Original Message-----
> >> From: users-bounces at lists.ironpython.com [mailto:users-
> >> bounces at lists.ironpython.com] On Behalf Of Seo Sanghyeon
> >> Sent: Saturday, July 25, 2009 5:07 AM
> >> To: Discussion of IronPython
> >> Subject: [IronPython] IronPython ctypes on Linux
> >>
> >> Hopefully I'm not too late on reporthing this...
> >>
> >> If you look at ctypes/__init__.py in Python 2.6, it imports
> different
> >> functions from _ctypes depending on os.name. So on Linux, it expects
> >> dlopen to be available, instead of LoadLibrary.
> >>
> >> --
> >> Seo Sanghyeon
> >> _______________________________________________
> >> Users mailing list
> >> Users at lists.ironpython.com
> >> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
> >
> > _______________________________________________
> > Users mailing list
> > Users at lists.ironpython.com
> > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
> >
>
>
>
> --
> slide-o-blog
> http://slide-o-blog.blogspot.com/
> _______________________________________________
> Users mailing list
> Users at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com



More information about the Ironpython-users mailing list