Boost logo

Boost Users :

From: Brian Hall (b.hall_at_[hidden])
Date: 2006-09-23 20:32:47


I have been using boost and STLPort for sometime and I have built up
unit tests for my projects that have worked fine up until now. However,
I've been lazy and used the #include unit_test_framework.hpp route
instead linking to libraries.

Now I'm stuck. My tests won't compile with STLPort 5.0.x, apparently
because the complier needs more memory (I'm using MS VC++6(SP5) and I've
set the complier option /Zm to extend to its maximum).

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

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.

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.

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.

What is a poor boy to do?!!

Please give me some ideas


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