In the boost unit testing documentation it specifically states that you need to define BOOST_TEST_DYN_LINK in order to link with the boost unit test library.
I am using this basic example:
#define BOOST_TEST_DYN_LINK
#define BOOST_TEST_MODULE test_module1
// This header is for the dynamic library, not the header only one
#include <boost/test/unit_test.hpp>
BOOST_AUTO_TEST_CASE(test1) {
BOOST_CHECK(true);
}
I have added boost to my include/library paths and the code compiles fine, but when I compile boost unit tests using Visual Studio and try to run them I get the following error:
The application was unable to start correctly (0xc000003b).
I feel like I just need to point out how vague and not helpful this error message is at all...
For some reason if I remove the line #define BOOST_TEST_DYN_LINK
the code will compile and run successfully, but this goes directly against what the boost documentation says.
Why is this happening?
Additional info:
This is what I am using:
boost v1_63_0