Boost logo

Boost-Build :

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


Hello,

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
#define BOOST_LIB_DIAGNOSTIC yes
#include <boost/config/auto_link.hpp>

which tells me: Linking to lib file:

libboost_unit_test_framework-vc6-sgdpn-1_31.lib

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
happening.

Many thanks,
George

 


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk