Boost logo

Boost :

From: Dave Jenkins (david_at_[hidden])
Date: 2007-12-02 22:20:52

"Gennadiy Rozental" <rogeeff_at_[hidden]> wrote in message
> "Dave Jenkins" <david_at_[hidden]> wrote in message
> news:fi71bn$106$
>> When I include header <boost/test/unit_test.hpp> in my program, the
>> linker
>> complains that symbol "execution_exception" is undefined. I looked at
>> the
>> compiler output and found that class "execution_exception" is a parameter
>> on
>> "virtual void exception_caught(execution_exception const&)" in file
>> test_observer.hpp. It is declared but never defined.
> What is?

The symbol "execution_exception". It is forward declared but does not
have a definition. I verified this by looking at the preprocessor output.

I was able to successfully compile and run all the Xpressive tests
and examples with the /clr flag under msvc-9.0, after I added
"#include <boost/test/execution_monitor.hpp>" to file
"test_observer.hpp" to fix the linker warning. The warning is
"LNK4248: unresolved typeref token (01000015) for

> If it compiles it should work fine. The exception is implemented in the
> library.

Oops, maybe I should have compiled the library with /clr too.

Anyway, here is an example command line and program to
duplicate the problem under msvc-8.0:
Dave Jenkins

cl /clr test_1.cpp -I%BOOST_ROOT% /link
libboost_unit_test_framework-vc80-mt-1_35.lib /ENTRY:main

// test_1.cpp
#include <boost/test/unit_test.hpp>
// #include <boost/test/execution_monitor.hpp>
void test1() {}
using namespace boost::unit_test;
test_suite* init_unit_test_suite( int argc, char* argv[] )
    test_suite *test = BOOST_TEST_SUITE("test1");
    return test;

Boost list run by bdawes at, gregod at, cpdaniel at, john at