From: Gennadiy Rozental (gennadiy.rozental_at_[hidden])
Date: 2007-05-16 02:41:08
"Jody Hagins" <jody-boost-011304_at_[hidden]> wrote in message
> On Tue, 15 May 2007 07:33:39 -0600
> Douglas Gregor <doug.gregor_at_[hidden]> wrote:
>> I think we should revert this change for 1.34.1, so that main()
>> appears in both the static and the shared library. This makes the
>> simple use cases (which used to work!) work again.
> I agree. Worse, our tests that now pass on 1.33 fail to build on 1.34.
> They require extra stuff in the code to work on 1.34... not the worst
> thing in the world, but... here's the kicker... we have to change every
> single test program we have to accomodate these changes...
> We now need to define BOOST_TEST_DYN_LINK in the appropriate build files
Only if you use dynamic version of the UTF. But this is common requirements
of all boost libraries.
> We now have to define BOOST_TEST_MAIN in all our test programs that used
> to get main() by simply linking to the shared library. That's a LOT of
> source files to change.
That's not true. Or rather mostly not true. If you used to use static
library and continue using it no change required. If you used shared library
variants and had BOOST_TEST_AUTO_MAIN no change required either. If you used
dynamic library and did not define above flag you have much bigger problem.
you test module won't compile at all. The initialization function signature
> In summary, I have to change EVERY SINGLE test program in my company
> that uses Boost.Test and does not use auto-test (though I probably need
> to change those as well, because that feature is deprecated... though
> still supported)... and EVERY SINGLE makefile that builds them.
What do you mean? Automatic registration facilities are not only still
supported in a scope thay were defined in 1.33.1, but in fact significantly
improved and extended. I personally recommend moving all your test modules
to this facilties. As for the test modules that employ manual registraition
and static library variant, my understanding is that they worked my chance.
You "thought" you are linking with static library, while in fact you linked
with shared one. The only change is required for test modules that employ
manual registration and dynamic library variant. 1.34.0 allows you now to
build these on NT without any code change. But you are required to make it
conformant with new initalization function specification and implement
function main() manually. I am showing example of how it's done on my Friday
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk