Boost logo

Boost Users :

From: Gennadiy Rozental (gennadiy.rozental_at_[hidden])
Date: 2006-09-24 04:47:53


"Brian Hall" <b.hall_at_[hidden]> wrote in message
news:4515D22F.7010008_at_irl.cri.nz...
[...]
> So I decided to build the boost libraries (boost 1_33_1).
>
> Unfortunately, now I can't get my testing code to link with these
> libraries!
>
> Could anyone tell me which of the following I should be linking to (I am
> building in 'release' mode with multithreading)?
>
> libboost_unit_test_framework-vc6-mt-gdp-1_33_1.lib
> libboost_unit_test_framework-vc6-mt-gdp.lib
> libboost_unit_test_framework-vc6-mt-p-1_33_1.lib
> libboost_unit_test_framework-vc6-mt-p.lib
> libboost_unit_test_framework-vc6-mt-sgdp-1_33_1.lib
> libboost_unit_test_framework-vc6-mt-sgdp.lib
> libboost_unit_test_framework-vc6-mt-sp-1_33_1.lib
> libboost_unit_test_framework-vc6-mt-sp.lib

There is a page in general boost docs (somewhere abound boost.build docs)
that explains meaning of all these letters.

> In fact, I've tried them all without success.
>
> Here is an example error message:
>
> libboost_unit_test_framework-vc6-mt-sp-1_33_1.lib(framework.obj) : error
> LNK2001: unresolved external symbol "class boost::unit_test::test_suite
> * __cdecl init_unit_test_suite(int,char * * const)"
> (?init_unit_test_suite@@YAPAVtest_suite_at_unit_test_at_boost@@HQAPAD_at_Z)
> Release/mst_gum_tree_real_dev.exe : fatal error LNK1120: 1 unresolved
> externals Error executing link.exe.

Do you have this function init_unit_test_suite?

> Also, I simply removed the #include of unit_test_framework.hpp in my
> original source code. Is that correct? The remaining includes are:
> unit_test.hpp and floating_point_comparison.hpp.

should be ok.

> As an alternative to linking to the libraries, I have tried to include
> the source files in my project, as suggested in the unit test
> documentation, but that doesn't work either! The documentation does not
> appear to be up to date.

Yep. That's true, unfortunately.

It should work, once you link with proper 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