Boost logo

Boost Users :

From: John Maddock (john_at_[hidden])
Date: 2005-09-27 04:33:07


> I had modify this example a little, since without "#define geaendert_RK"
> it did not compile - neither with nor without libs.

It should.

> #include <boost/test/unit_test.hpp>
>
> #define geaendert_RK // required to compile with g++, BCB6 - RK
> #ifndef geaendert_RK
> using boost::unit_test::test_suite;//Unresolved external '_main' - RK
> #else
> #include <boost/test/included/unit_test_framework.hpp>
> using namespace boost::unit_test_framework;
> #endif
> Why does this compile without any libs?

With the define, it #includes the full source of the library via
<boost/test/included/unit_test_framework.hpp>. Without it you need to link
against the unit test lib which will contain your program's main.

John.


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