Boost logo

Boost-Build :

From: gbmvdd (grebe_at_[hidden])
Date: 2004-06-29 09:49:12


I'm trying to use Boost libraries (specifically the unit test suite)
and getting some strange linker errors. I've built the libraries
against STLport 4.6 using MSVC6, with the following command line:

..\bjam "-sTOOLS=msvc-stlport" stage

after setting up STLPORT_4.6_PATH and STLPORT_VERSION appropriately,
and that all seems to work.

My project is set up to use a single-threaded statically-linked debug
runtime. I implicitly link to the test framework using these lines in
an implementation file:

#define BOOST_LIB_NAME boost_unit_test_framework
#include <boost/config/auto_link.hpp>

which tells me: Linking to lib file:


This library file should be statically linked to a single-threaded
debug runtime library, plus a STLport runtime with native IO
streams - correct? So far, so good. I was therefore surprised to get
linker errors of the form:

LIBCMTD.lib(dosmap.obj) : error LNK2005: __dosmaperr already
defined in LIBCD.lib(dosmap.obj)

Closer investigation revealed that the above unit test framework
library's object files contain a /DEFAULTLIB:LIBCMTD.lib where I
think it should be LIBCD.lib. Can anyone shed any light on why that
might be? It suggests to me that bjam is telling the compiler /MTd
when it should be told /MLd, but I can't figure out why that would be

Many thanks,


Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at