[prev in list] [next in list] [prev in thread] [next in thread] 

List:       python-distutils-sig
Subject:    Re: [Distutils] C extension modules
From:       Torsten Mohr <tmohr () s ! netic ! de>
Date:       2010-01-27 23:51:03
Message-ID: 201001280051.03665.tmohr () s ! netic ! de
[Download RAW message or body]

Hello,

thank you all for your hints.  I've created a setup.py and can compile my C++ 
extension module now.

> > Also, i use libjpeg, libtiff and libpng.  Can i portably test for
> > presence and version of these libs on Linux, Windows and other OSes?
> 
> Not really.  There is distutils.ccompiler.find_library_file() and
> friends which you might put to good use, but I've never seen it being
> used or used it myself.  And it's quite complicated to get a usable
> instance of CCompiler, expect to read distutils source.
> 
> But generally you can just use the platform default includes and then
> it will simply fail to compile if they're not present.

But when using:

libraries = [ 'jpeg', 'png', 'tiff']

Then the dynamic libraries are linked, which i not necessarily want.
Using names line libjpeg.a seems to work but is not portable.

In distutils.ccompiler it seems in CCompiler() there is something like 
"library_filename()", has anybody got an example?  Or is there a better 
solution?


Best regards,
Torsten.
_______________________________________________
Distutils-SIG maillist  -  Distutils-SIG@python.org
http://mail.python.org/mailman/listinfo/distutils-sig
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic