[Baypiggies] Help with ctypes
Glen Jarvis
glen at glenjarvis.com
Sat Dec 5 23:18:21 CET 2009
Thanks for the help Jeremy and Michael!
Cheers,
Glen
> ET_DYN means it looking for a dynamic (shared) library, not an
> object file.
>
> Try
>
> gcc --shared -o demo.so demo.c
>
> Then use ctypes.cdll.LoadLibrary('demo.so'). This works for me.
>
> - Jeremy
>
Hi Glen,
You need to turn it into a shared library with the -shared and -fPIC
compiler options. Take a look at:
http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html.
Particularly section 3.4
--mike
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/baypiggies/attachments/20091205/25e6b655/attachment.htm>
More information about the Baypiggies
mailing list