[Distutils] libraries options
M.-A. Lemburg
mal@lemburg.com
Mon Feb 5 13:57:22 2001
Robin Becker wrote:
>
> In article <023201c08d1c$7092bf40$e000a8c0@thomasnotebook>, Thomas
> Heller <thomas.heller@ion-tof.com> writes
> >Robin Becker writes
> >> It seems that the libraries options are different to the Extension ones.
> >> is it intentional that macros <> define_macros and that there is no
> >> equivalent to undef_macros?
> >I don't think so.
> >To me it seemed strange that I have to use an instance of Extension
> >to specify 'ext_modules', but have to supply dictionaries to 'libraries'.
> >
> >ext_modules and libraries probably should be unified.
> >
> >Thomas
> >
> OK I have been using static libs with distutils for a couple of days and
> have noticed the following.
>
> 1) Under win32 at least the .lib files are placed by default in
> temp.win32-2.0\ imho they should be placed alongside other object
> modules.
>
> 2) The lib objects aren't placed in a release/debug subdirectory.
>
> 3) If a dynamic lib of the same name is present in one of the
> directories mentioned in a libpath option that lib gets used first
> (wrongly).
Hmm, the source says:
# The MSVC linker generates .lib and .exp files, which cannot be
# suppressed by any linker switches. The .lib files may even be
# needed! Make sure they are generated in the temporary build
# directory. Since they have different names for debug and release
# builds, they can go into the same directory.
Don't the debug builds have the "_d" suffix ? This should avoid
any problems with mixing the two.
About 3): if your import lib uses the same name as a common
DLL then your lib should probably use a different name, since
this would cause problems sooner or later anyway.
Unless, of course, I've overlooked something here -- I'm not
much of a Windows guy ;)
--
Marc-Andre Lemburg
______________________________________________________________________
Company: http://www.egenix.com/
Consulting: http://www.lemburg.com/
Python Pages: http://www.lemburg.com/python/