I confess I'm a little afraid of going back to boost bug reports and regression tests pages. I get lost in there very easily and can't make most of the information given. It's my fault, I know. But until I get more knowledgeable about these things, they will keep giving me an headache.

So, in hoping someone here uses Boost::Test, and uses it under MinGW 3.4.5, I need to know if you are experiencing the same problem as I am...

Library: libboost_unit_test_framework-mgw34-1_34 (static and DLL, debug and release)

Linking my tests with the release static library or with the release DLL gives me an Access Violation at runtime. Only with the debug versions of these libraries can I make my tests work.

(2)
In fact, even with the debug version, some tests end up also originating Access Violations at runtime. This is a typical example:

Code:
#include <boost/test/unit_test.hpp>
using namespace boost::unit_test;

void free_test_function()
{
    BOOST_CHECK(2 == 1);

    int* p = (int*)0;
    BOOST_CHECK( *p == 0 ); // Access violation here
}

test_suite* init_unit_test_suite( int, char* [] ) {
    framework::master_test_suite().p_name.value = "Unit test example 02";

    framework::master_test_suite().add( BOOST_TEST_CASE( &free_test_function ), 2 );

    return 0;
}

If you are just passing by this thread , naturally an Access Violation is expected. However, BOOST_CHECK has the capability of catching that.