Anders Stenberg wrote:
> About the dependencies, it's so obvious anymore then. Just because a
> lib links to a main lib (like k3dsdk), it doesn't mean it has to link
> to all the libs that links to (gtkmm, whatever). Seems like a bit of
> linker bloat there. But, it's just a minor detail so it doesn't matter
> really.
>
CMake links every library with its dependencies, its dependencies'
dependencies, and-so-on. If I recall correctly, the rationale for doing
it that way is:
* For static libs, it's what you want.
* For shared libs on some platforms, it's also what you want.
* For shared libs on the remaining platforms, it's harmless.
> The current way of doing it is:
> 1. Compile the libs with .map file generation enabled (a setting in VC)
> 2. Run a little python app I did that extracts some information from
> the .map and generates a .def
> 3. Compile the libs again, using the .def-files
>
> That process can't really be done automatically, so it's a bit of
> twiddling to get it running.
>
Download the stable glibmm sources:
http://ftp.gnome.org/pub/GNOME/sources/glibmm/2.12/glibmm-2.12.10.tar.bz2
and take a look at their MSVC_Net2003 directory. You'll find sources
for the "gendef" binary which generates a .def file from a collection of
*.obj files (not the library itself), so it can be run as a prelink
step. Integrating it into CMake won't be any trouble for us, and the
whole thing will be automatic.
Cheers,
Tim
|