Boost logo

Boost :

Subject: Re: [boost] [filesystem] Linker error against std::codecvt in VS2012 RC
From: Stephan T. Lavavej (stl_at_[hidden])
Date: 2012-06-01 18:09:42

[Lars Viklund]
> I foolishly installed the Visual Studio 2012 RC yesterday night and made
> an overnight build of Boost.

> [1] 1>libboost_filesystem-vc110-mt-gd-1_50.lib(path.obj) : error
> LNK2001: unresolved external symbol "protected: virtual int __thiscall
> std::codecvt<wchar_t,char,int>::do_length(int const &,char const *,char
> const *,unsigned int)const "
> (?do_length@?$codecvt@_WDH_at_std@@MBEHABHPBD1I_at_Z)

FYI, Marshall Clow reported DevDiv#307389 "codecvt: length() and do_length() should take modifiable stateT&", which we've fixed in VC11/VS2012. Previously (in VC10 and earlier) we took const stateT&, which didn't follow the Standard.

The difference is highly significant to anyone attempting to override this virtual function. Unfortunately, I have no way of informing users automatically when they're affected by this change, so my plan is to fall back on my usual response of "because the Standard told us to" - or in this case, "because Marshall told us to". :->

> I dread to think of the horror that I will have go through in actually
> reporting a bug against the runtime itself :(

The usual path is Microsoft Connect, but you may report STL bugs directly to me at stl_at_[hidden] . (I strongly appreciate self-contained repros, unless the problem in the source code is ridiculously obvious).

As a service to Boost, I will also file compiler and CRT bugs (in which case a self-contained repro is mandatory, because I'm just going to copy-and-paste it into TFS and let those teams figure it out).

Stephan T. Lavavej
Visual C++ Libraries Developer

Boost list run by bdawes at, gregod at, cpdaniel at, john at