Boost logo

Boost Users :

Subject: Re: [Boost-users] unit tests: auto tests, missing main, redef'edinit_unit_test_suite
From: Gennadiy Rozental (rogeeff_at_[hidden])
Date: 2009-06-04 11:57:57


Hicham Mouline <hicham <at> mouline.org> writes:

> As I said in my email that crossed yours, I did but
> init_unit_test_suite(...) was still multiply defined,

Rebuild. It should only be defined in the translation unit
defining BOOST_TEST_MAIN

> g++ <otherflags> -DBOOST_TEST_MAIN= -o <translationunit1.o> -c
> <translationunit1.cpp>
> g++ <otherflags> -o <translationunit2.o> -c
> <translationunit2.cpp>
> ...
> g++ <otherflags> -lboost_unit_test_framework-gcc34-mt-d-1_37
> -o test *.o
>
> also, the main function is not found.

Make sure you link with static library.

Or add define BOOST_TEST_DYN_LINK in your compilation line and
link with shared library.

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