Boost logo

Boost Users :

Subject: Re: [Boost-users] Boost.Test - problems overriding main
From: Gennadiy Rozental (rogeeff_at_[hidden])
Date: 2015-09-02 14:48:40


 <ramonpadilla1 <at> yahoo.co.uk> writes:

>
>
>
> I want to provide my own main function while using Boost.Test.

Please take a look at new docs for detailed explanation on this subject
with examples.

> So I have included the following macros:
>
>     #define BOOST_TEST_ALTERNATIVE_INIT_API
>     #define BOOST_TEST_NO_MAIN
>
> but this gives me the following error when build on OS X using Xcode 6: 
>
>     Undefined symbols for architecture x86_64:
>       "boost::unit_test::unit_test_main(bool (*)(), int, char**)",
referenced from:
>           _main in main.o

This is because your library was built without
BOOST_TEST_ALTERNATIVE_INIT_API.

>
> I found out that including the following file:
>
>     #include <boost/test/incl•½Õ¹¥Ñ}Ñ•Íй¡ÁÀø()M¥¹±”¡•…‘•ÈÙ•ÉÍ¥½¸Ý¥±°Ý½É¬¥¹‘••¸€((ø€(øÉ•Í½±Ù•ÌÑ¡¥ÌÁɽ‰±•´‰ÕЁ$´½¹™ÕÍ•…‰½ÕЁѡ”¥µÁ±¥…Ñ¥½¹Ì¸€()e½Õȁ½¹±ä¥µÁ±¥…Ñ¥½¸¥ÌÑ¡…Ёå½ÔÝ¥±°¡…Ù”Ñ¼ÍÁ•¹„‰¥Ðµ½É”Ñ¥µ”½¸€)½µÁ¥±…Ñ¥½¸€¡µ…剔¹•±¥¥‰±”°¥˜å½Ô¡…Ù”•¹½Õ Á½Ý•È¤…¹å½Ô¡…Ù”Ñ¼€)ÍÑ¥¬Ý¥Ñ Í¥¹±”™¥±”Ñ•ÍЁµ½‘Õ±•Ì¸(


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