newbie: python/C extensions in cygwin
Mark Higgins
mghiggins2003 at hotmail.com
Sun Jan 26 22:33:00 EST 2003
Thanks for the info! I've never heard of distutils, but it sounds like
something I should check out.
Jason Tishler wrote:
> Mark,
>
> On Sun, Jan 26, 2003 at 02:42:41AM +0000, Mark Higgins wrote:
>
>>Ah - found the prob - cygwin stuck libpython2.2.dll into /bin
>
>
> Which is correct. DLLs which are loaded automatically by the Windows
> loader instead of dlopen()-ed by the application go in /usr/bin.
>
>
>>instead of some more reasonable directory like /lib or /usr/lib.
>
>
> Note, that the import library libpython2.2.dll.a is in
> /usr/lib/python2.2/config.
>
>
>>So I needed -lpython2.2 and -L/bin in the compile line.
>
>
> No, you need to supply -L/usr/lib/python2.2/config -lpython2.2 while
> linking and -DUSE_DL_IMPORT while compiling. Note that you should link
> against the import library instead of directly against the DLL.
>
> BTW, if you use distutils, then the above will happen automatically.
>
> However, your post has got me thinking that maybe make install under
> Cygwin should copy libpython2.2.dll.a to /usr/lib too? This would
> facilitate building shared extensions without using a tool like
> distutils.
>
> Jason
>
More information about the Python-list
mailing list