Boost logo

Boost Users :

Subject: Re: [Boost-users] [test] manual test suite initialization: linking problems
From: Gennadiy Rozental (rogeeff_at_[hidden])
Date: 2009-07-16 13:32:51


Matthias Vallentin <vallentin <at> icsi.berkeley.edu> writes:

> It works, however, using the automatic test module definition, e.g.
>
> #define BOOST_TEST_DYN_LINK
> #define BOOST_TEST_MODULE foo
> #include <boost/test/unit_test.hpp>

This is fine
 
> and works also when I remove BOOST_TEST_DYN_LINK and compile the
> program with the static library:
>
> g++ test.cc /opt/local/lib/libboost_unit_test_framework-mt.a

This is fine as well.
 
> But I can't get the first example code above to link. Does anyone
> see the problem lurking?

The problem is that you are missing main, which does not reside in
shared library. You can either implement one yourself, or use one
of two approaches above.

Why do you want manual registration?

Gennadiy


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net