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

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/_core_.2f.MD.2c_2f.ML.2c_2f.MT.2c_2f.LD.asp

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)

Phillip


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