ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> python-list
python-list
Re: newbie: python/C extensions in cygwin
by Jason Tishler other posts by this author
Jan 26 2003 5:06AM messages near this date
Re: newbie: python/C extensions in cygwin | Re: Generating Unique Keys
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

-- 
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6

-- 
http://mail.python.org/mailman/listinfo/python-list
Thread:
Mark Higgins
Mark Higgins
Jason Tishler

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved