From: John Maddock (John_Maddock_at_[hidden])
Date: 2001-08-19 06:43:34
>That's what you want, right?
>Okay, I'm confused again.
I think we both are :-)
OK lets try again, imagine a fairly "classic" library: it consists of only
free functions (f1(), f2(), ...fn()), each of which is in it's own source
file (f1.cpp f2.cpp etc), these functions do *not* reference each other.
To build a static lib we just add all the object files to the library.
Likewise if we want to build the library as a shared lib (dll).
Now the problem was with linker command line lengths getting too long if
there are more than a couple of .cpp files to add to the lib, and the
suggestion was that some of the .cpp files be built as a static lib first,
and that this could then be linked in - except that this really doesn't
work (see attached project). We could I suppose create a single .cpp file
that just #includes all the others and then build the dll as a single file
- but then changes to one of the .cpp files means the whole thing has to be
rebuilt rather than just rebuilding one .cpp file and relinking.
In any case I've had a chance to test the latest FTJam release now, and
that does at least build the regex lib as a dll without using any of these
hacks (and yes even under win98!), so maybe we should forget the whole
thing for now...
- John Maddock
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk