[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!



> 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:
Particularly section 3.4


-------------- 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