Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2002-12-06 06:51:29

Markus Schöpflin wrote:

>>I can't say, in general. From my point of view --- yes. I never
>>understood why I should declare two target to achive the same goal
>>-- building a library. Linux users are assustomed to easy switching
>>static and dynamic linking. If you have "lib" and "dll", you'll
>>either build them all (and that seems unnecessary), or you have
>>introduce features that control if either one should be build ---
>>i.e. you're back to "shared".
> What about the problem that you usually have additional sources for
> building a DLL on windows? The code for DllMain() for example. Can I
> specify that somehow?

Yes, that's possible, if we implement the "source" target as
Rene suggested:

source dll-files : dll_main.cpp : <toolset>msvc <shared>true ;
source dll-file ;

lib a : a.cpp b.cpp dll-files ;

You specify two alternatives for "dll-files" target. On msvc, when
building shared, the first one will be selected, which will add
"dll_main.cpp" to the list of sources. The second alternative
is "catch(...)" -- it specifies that on other platforms, no
dll specific files a needed.

> By the way, what is the current state of the discussion? I have to
> admit I somehow lost track of it. I have to agree with you, the time
> lag in mail delivery does make it difficult to follow. Did you decide
> we need two features for the whole issue or a single one?

I'm beginning to loose it too. I'll try to summarize it a little bit
later -- I'm now converting CVS repository to Subversion one (and trying
to do something about 3 working copies, 300MB each).

- Volodya


Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at