Boost logo

Boost-Build :

From: Phillip Seaver (phil_at_[hidden])
Date: 2006-11-10 13:05:52

Vladimir Prus wrote:
> However, I realize I don't understand that threading=multi means on msvc. It
> certainly affects which runtime is selected. But does it affect the generated
> object files in any way?

I wouldn't call myself an expert, but I use the compiler fairly
frequently. :-) Yes, it does. From the MSDN documentation:

"/MT - Defines *_MT* so that multithread-specific versions of the
run-time routines are selected from the standard header (.h) files.
This option also causes the compiler to place the library name
LIBCMT.lib into the .obj file so that the linker will use LIBCMT.lib to
resolve external symbols. Either /MT or /MD (or their debug equivalents
/MTd or /MDd) is required to create multithreaded programs."

Some things are defined differently for MT builds. For example, "errno":

    #if defined (_MT) || defined (_DLL)
    _CRTIMP extern int * __cdecl _errno(void);
    #define errno (*_errno())
    #else /* defined (_MT) || defined (_DLL) */
    _CRTIMP extern int errno;
    #endif /* defined (_MT) || defined (_DLL)


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