Boost logo

Boost :

From: Roland (roland.schwarz_at_[hidden])
Date: 2004-08-04 01:56:42


On Mon, 02 Aug 2004 23:07:38 -0400 Michael Glassford <glassfordm_at_[hidden]> wrote:

> In the code you posted, the missing symbols are all defined as extern;
> what do I need to do to get their actually definitions linked in?

This is very strange. The symbols are all defined by the CRT. The _tls_used is
the 'magic' symbol that seems to be created by the linker itself when needed. As
far as we know it is used to create the automatic TLS directory for PE.

Nevertheless I tried to modify my local copy of the threadmon and it worked.
Here is what I did:

in file threadmon.cpp:

        #if defined(BOOST_MSVC) && (BOOST_MSVC >= 1310) //1310 == VC++ 7.1
            //As currently defined, the following is known
            //to work only for VC++ 7.1.
            //It is known not to work with VC 6.
            #include <libs/thread/src/pe_tls.ipp>
        #elif defined(BOOST_MSVC) && (BOOST_MSVC >= 1200) //200 == VC++ 6.0
            #include <libs/thread/src/pe6_tls.ipp>
        #endif

the file pe6_tls.ipp is my original post, wrapped for C bindings:

#include <stdlib.h>
#define WIN32_LEAN_AND_MEAN
#include <windows.h>

extern "C" {
   ... original posted file ...
};

I am doing bjam -s"TOOLS=msvc" --prefix=C:\ install
then.

I verified, that the correct version is getting called by stepping into the
source file with the debugger.

I hope his issue can be resolved.

BTW.: I am currently testing if there are any problems when linking
the boost threads statically to a user DLL,
and if there are any drawbacks/interferences to the
__declspec(thread) of the compiler, as was mentioned by Aaron.

Roland


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