Boost logo

Boost :

From: Martin Schulz (Martin.Schulz_at_[hidden])
Date: 2008-02-28 03:25:44


Hello Markus,

you should not link your _application_ against boost test at all.
IMHO, you should compile the test cases in a separate executable that
runs all tests one after the other.

The simplest way to avoid any link hassle there is to have a single cpp
file containing

#define BOOST_AUTO_TEST_MAIN
#include <boost/test/auto_unit_test.hpp>
#include <boost/test/included/unit_test_framework.hpp>

And compile this (together with your test cases) into a command line
executable. That way, the linker has a little bit more to do on each
compiler run, but you do avoid any mismatch of compiler options and the
like.

Yours,

-- 
Dr. Martin Schulz (schulz_at_[hidden])
Senior R&D Engineer 
Synopsys GmbH 
Karl-Hammerschmidt-Str. 34
D-85609 Dornach, Germany
Munich office: +49 (89) 993-20203
Home office:   +49 (721) 6099511
http://www.synopsys.com
> -----Original Message-----
> From: boost-bounces_at_[hidden]
[mailto:boost-bounces_at_[hidden]]
> On Behalf Of Duft Markus
> Sent: Donnerstag, 28. Februar 2008 08:42
> To: boost_at_[hidden]
> Subject: [boost] Problem linking Boost Unit Test Library on windows
(1.33.0)
> 
> Hi!
> 
> I have a problem linking our application on windows. Somebody added
test
> cases using the boost unit test library, and since then windows won't
> link anymore. The problem is, that the boost library contains a "main"
> and doesn't seem to contain a "init_unit_test_suite" function (am I
> missing a library?). It works on all other systems, is windows
> unsupported there?
> 
> Is there any more information I should gather for you to see the
> problem, or is this a known issue (I remember seeing something on the
> list about this, but I think it was about a newer boost version. Can
any
> eventually made changes be expressed as a patch for 1.33.0 so I can
> locally fix the issue, and won't need an upgrade)?
> 
> Cheers, Markus
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk