Boost logo

Boost Users :

Subject: Re: [Boost-users] [Test]: Problem with simple Boost.Test
From: Gennadiy Rozental (rogeeff_at_[hidden])
Date: 2013-06-20 13:01:54


thusly:$ ${CXX} -c --std=c++0x -g -I${TARGET}/include cma.cpp -o cma.o
> $ ${CXX} --std=c++0x -g cma.o ${TARGET}/lib/libboost_test_exec_monitor.a \
> ${TARGET}/lib/libboost_unit_test_framework.dylib -o cma
>
>
> Why are you linking against boost_test_exec_monitor?
> I've never needed to do that.  boost_unit_test_framework should be enough.
>
>
> Interesting.  Because I'm finding the following:

I know docs are not ideal but this part is very clear I thought.
test_exec_monitor is an old alternative t ounit test framework, which is
long deprecated and they definitely do not require each other
 
>
> $ ${CXX} -c --std=c++0x -g -I${TARGET}/include cma.cpp -o cma.o 
> $ ${CXX} --std=c++0x -g cma.o
${TARGET}/lib/libboost_unit_test_framework.dylib -o cma 
> Undefined symbols for architecture x86_64:
>   "_main", referenced from:
>      implicit entry/start for main executable
> ld: symbol(s) not found for architecture x86_64
> collect2: error: ld returned 1 exit status
> $ 

How do you use Boost.Test? Automated test unit registration?
Are you sure you've defined BOOST_TEST_MODULE/BOOST_TEST_MAIN?

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