4

We use Boost statically linked with our app but now I want to use Boost Test with an external test runner and that requires the tests themselves to link dynamically with Boost.Test through the use of the required BOOST_TEST_DYN_LINK define.

Is this going to be a problem or is the way Boost Test links completely unrelated to the way the other Boost libraries are linked?

Løiten
  • 3,185
  • 4
  • 24
  • 36
Halt
  • 2,924
  • 4
  • 22
  • 26
  • 1
    Why not just dynamically link Boost? – alternative Jun 13 '10 at 13:30
  • It adds another set of DLL's to an already extensive list. These have to be included in the installer and installed at the client computer etc. This makes room for extra problems with missing DLL's, invalid versions etc. We're not against it but for now we are a little more in favor of statically linking. – Halt Jun 13 '10 at 13:47
  • statically linking may cause problems too, such as the one you are asking here. I suggest you dynamically link boost. – Sam Miller Jun 13 '10 at 15:16

1 Answers1

2

I believe Boost Test does not depend on any other compiled libraries, so dynamically linking it while statically linking the other Boost libraries should not be a problem. Our linking rules don't show any dependency of Boost Test on anything other than headers, nor do the rules in the boost.jam file (though the latter is out of date).

AFoglia
  • 7,968
  • 3
  • 35
  • 51