You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stdcxx.apache.org by Anton Pevtsov <An...@moscow.vdiweb.com> on 2006/01/10 16:53:08 UTC

stdlib failed to build (MSVC-7.1) because of a compilation problem with mbstate_t

> I got the latest version from the SVN and tried to build it. The
> stdlib build failed with the compilation error:
> 
> ...
> wctype.cpp
> D:\Projects\RogueWave\work\apache\src\..\include\loc\_locale.h(400) :
> error C2039: 'mbstate_t' : is not a member of 'std'
> ...
> 
> (and this error is duplicated 168 times).
> 
> I suppose that the cause of this error is that mbstate_t wasn't
> declared properly (but the mbstate_t test in the etc\config\src was
> built successfully).
> 
> This may be unexpected results of the latest changes in the
> include\rw\_mbstate.h file (see
> http://svn.apache.org/viewcvs?rev=366948&view=rev).
> But another version is that there is an error in the
> include\ansi\cwchar header:
> There is the following code (see cwchar, line 103):
> 
> ...
> #ifdef _RWSTD_NO_MBSTATE_T_IN_STD
> 
> using ::mbstate_t;
> 
> #endif   // _RWSTD_NO_MBSTATE_T_IN_STD
> ...
> 
> But the "similar" types (size_t, wint_t, tm) use the ifndef directive
> instead of the ifdef in their definitions in the cwchar header. So I
> tried this code:
> 
> ...
> #ifdnef _RWSTD_NO_MBSTATE_T_IN_STD      // here I used ifndef instead
> of ifdef
> 
> using ::mbstate_t;
> 
> #endif   // _RWSTD_NO_MBSTATE_T_IN_STD
> ...
> 
> And this fixed the problem. But I am not sure that this way is
> correct, maybe we should modify the config.h to avoid the problem...
> 
> 
> Martin, what do you think about it?

Re: stdlib failed to build (MSVC-7.1) because of a compilation problem with mbstate_t

Posted by Martin Sebor <se...@roguewave.com>.
Hi Anton,

After testing it on all previously working platforms including
Windows (whew!) I applied the patch at r367898.

Martin

Martin Sebor wrote:
> Anton Pevtsov wrote:
> 
>>> I got the latest version from the SVN and tried to build it. The
>>> stdlib build failed with the compilation error:
>>>
>>> ...
>>> wctype.cpp
>>> D:\Projects\RogueWave\work\apache\src\..\include\loc\_locale.h(400) :
>>> error C2039: 'mbstate_t' : is not a member of 'std'
> 
> [...]
> 
>>> And this fixed the problem. But I am not sure that this way is
>>> correct, maybe we should modify the config.h to avoid the problem...
> 
> 
> As I just said to Liviu, I'm working on a patch that should make
> it all better so please bear with me. In the meantime, please go
> ahead and use your patch in your local sources so you can get
> stuff done.
> 
> Martin


Re: stdlib failed to build (MSVC-7.1) because of a compilation problem with mbstate_t

Posted by Martin Sebor <se...@roguewave.com>.
Anton Pevtsov wrote:
>>I got the latest version from the SVN and tried to build it. The
>>stdlib build failed with the compilation error:
>>
>>...
>>wctype.cpp
>>D:\Projects\RogueWave\work\apache\src\..\include\loc\_locale.h(400) :
>>error C2039: 'mbstate_t' : is not a member of 'std'
[...]
>>And this fixed the problem. But I am not sure that this way is
>>correct, maybe we should modify the config.h to avoid the problem...

As I just said to Liviu, I'm working on a patch that should make
it all better so please bear with me. In the meantime, please go
ahead and use your patch in your local sources so you can get
stuff done.

Martin