
Alexander Lamaison
Is it possible to create one's own main() implementation when using the pre-built Boost libraries from BoostPro?
Yes. If you use shared library.
The difficulty seems to be that, even if I define BOOST_TEST_NO_MAIN before including unit_test.hpp, the main method still exists in the pre-built library and this causes a linker conflict. The existing
You can't after the fact (after the library is built) change the symbols which are present there.
code I'm wokring on specifies /FORCE to the linker to make our main override the library main but I think that's a horrible solution and would really like to try something else.
hmm. I wasn't aware about this option.
Even better would be if there were a way to only invoke our code, which includes calls to framework::run(test), if a particular command-line argument were present. In all other cases it would be nice to have the default test runner behaviour. I think this may be wishful thinking though.
As I said. Using shared library you shaould be able to get what you want here. Gennadiy