Boost logo

Boost Users :

From: Peter (pjfoley_at_[hidden])
Date: 2005-03-23 07:05:05


Hi Gennadiy,

Thanks for replying.

Comments following.

> * To: boost-users_at_xxxxxxxxxxxxxxx <mailto:boost-users_at_DOMAIN.HIDDEN>
> * Subject: [Boost-users] Re: [Boost.Test] Link error,need to be
pointed in the right direction
> * From: "Gennadiy Rozental" <gennadiy.rozental_at_xxxxxxxxxxx
<mailto:gennadiy.rozental_at_DOMAIN.HIDDEN> >
> * Date: Sun, 20 Mar 2005 23:50:50 -0500
> * Organization: Thomson Financial
> * References:
<A3FB6A3DCF268B47A774EA32AE996CC338E3_at_quantum.Billswan.local
<http://lists.boost.org/MailArchives/boost-users/msg10496.php> >
> * Reply-to: boost-users_at_xxxxxxxxxxxxxxx
<mailto:boost-users_at_DOMAIN.HIDDEN>
> * Sender: news <news_at_xxxxxxxxxxxxx <mailto:news_at_DOMAIN.HIDDEN> >
>
> ________________________________
>
> You need to link with the Unit Test Framework component of Boost.Test
>
> Compile it (using bjam or you could use project file supplied with
library,
> VC 2005 will cmvert it to appropriate format automatically) and add to the
> list of libraries to link with.
>
> HTH,
>
> Gennadiy

I knew I had to link it against the Unit Test Framework libraries I just
wasn't sure exactly where to stipulate this. I didn't realise that you had
included some VC project files as an initial starting point.

Anyway I still need some help, I am almost there now .... I can feel it :p.
This is what I have done.

I have opened up the Version 7.1 project file(s), taking one at random
..\boost_1_32_0\libs\test\build\msvc71_proj\unit_test_example2.vcproj I
converted this file to the new format. Looking through all the project
settings I found a number of items that you set (or whoever initially setup
the projects).

The most interesting (disturbing) appears to be where you specify the lib
file dependency which is set to "unit_test_framework.lib", looking through
the (bjam) compiled lib directory I cannot find a lib file with that name
the closest files I have are:

------------------------
D:\Development\boost\lib\dir *unit_test*

 Volume in drive D is Applications
 Volume Serial Number is A8BC-D142

 Directory of D:\Development\boost\lib

03/03/2005 09:04 PM 1,385,358
libboost_unit_test_framework-vc80-mt-1_32.lib
03/03/2005 09:04 PM 6,076,308
libboost_unit_test_framework-vc80-mt-gd-1_32.lib
03/03/2005 09:04 PM 6,076,308
libboost_unit_test_framework-vc80-mt-gd.lib
03/03/2005 09:04 PM 1,936,966
libboost_unit_test_framework-vc80-mt-s-1_32.lib
03/03/2005 09:04 PM 1,936,966
libboost_unit_test_framework-vc80-mt-s.lib
03/03/2005 09:04 PM 6,957,836
libboost_unit_test_framework-vc80-mt-sgd-1_32.lib
03/03/2005 09:04 PM 6,957,836
libboost_unit_test_framework-vc80-mt-sgd.lib
03/03/2005 09:04 PM 1,385,358
libboost_unit_test_framework-vc80-mt.lib
03/03/2005 09:04 PM 1,936,678
libboost_unit_test_framework-vc80-s-1_32.lib
03/03/2005 09:04 PM 1,936,678
libboost_unit_test_framework-vc80-s.lib
03/03/2005 09:04 PM 4,495,796
libboost_unit_test_framework-vc80-sgd-1_32.lib
03/03/2005 09:04 PM 4,495,796
libboost_unit_test_framework-vc80-sgd.lib
              12 File(s) 45,577,884 bytes
               0 Dir(s) 297,679,298,560 bytes free
------------------------

Now I am guess I need to change that lib file to one of these. Going
through the project settings I have Multi-Threading on and it is obviously
in debug mode.

Looking at the bottom of this page:
http://www.boost.org/more/getting_started.html it describes what each of the
parts of the file name means (so I need mt, g and d).

Based on this information I chose:
libboost_unit_test_framework-vc80-mt-gd.lib

This appears to work. Is this correct? Or have a managed to add 2 + 2 and
get 5?

As a slight aside the IDE does not display the output of the Unit test. Was
it supposed to? I was under the impression that it should have.

One minor think that I think I found. Looking within the jamfile
..\boost_1_32_0\libs\test\build\Jamfile. I think that it is saying that it
needs a lib file named boost_unit_test_framework. I don't know if this is
or isnt the case (I have never used bjam before compiling boost), I just
thought I would mention it just in case that it is wrong as well.

Enough rambling from me now.

Thanks for reading through this and I appreciate any help anyone can
provide.

Peter.


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