[CMake] Problems with MSVC 2010 generator

Dominik Szczerba dominik at itis.ethz.ch
Mon Jul 9 07:12:31 EDT 2012


Hi,

In one, but not another, cmake-based bigger C++ project I am getting
the following errors trigger by a test.cxx file consiting only of one
line: #include <iostream>.

1>c:\Program Files (x86)\Microsoft Visual Studio
10.0\VC\include\string(543): error C2039: '_Stolx' : is not a member
of '`global namespace''
1>c:\Program Files (x86)\Microsoft Visual Studio
10.0\VC\include\string(543): error C3861: '_Stolx': identifier not
found
1>c:\Program Files (x86)\Microsoft Visual Studio
10.0\VC\include\string(560): error C2039: '_Stoulx' : is not a member
of '`global namespace''
1>c:\Program Files (x86)\Microsoft Visual Studio
10.0\VC\include\string(560): error C3861: '_Stoulx': identifier not
found
1>c:\Program Files (x86)\Microsoft Visual Studio
10.0\VC\include\string(577): error C2039: '_Stoulx' : is not a member
of '`global namespace''
1>c:\Program Files (x86)\Microsoft Visual Studio
10.0\VC\include\string(577): error C3861: '_Stoulx': identifier not
found
1>c:\Program Files (x86)\Microsoft Visual Studio
10.0\VC\include\string(594): error C2039: '_Stollx' : is not a member
of '`global namespace''
1>c:\Program Files (x86)\Microsoft Visual Studio
10.0\VC\include\string(594): error C3861: '_Stollx': identifier not
found
1>c:\Program Files (x86)\Microsoft Visual Studio
10.0\VC\include\string(611): error C2039: '_Stoullx' : is not a member
of '`global namespace''
1>c:\Program Files (x86)\Microsoft Visual Studio
10.0\VC\include\string(611): error C3861: '_Stoullx': identifier not
found
1>c:\Program Files (x86)\Microsoft Visual Studio
10.0\VC\include\string(627): error C2039: '_Stofx' : is not a member
of '`global namespace''
1>c:\Program Files (x86)\Microsoft Visual Studio
10.0\VC\include\string(627): error C3861: '_Stofx': identifier not
found
1>c:\Program Files (x86)\Microsoft Visual Studio
10.0\VC\include\string(643): error C2039: '_Stodx' : is not a member
of '`global namespace''
1>c:\Program Files (x86)\Microsoft Visual Studio
10.0\VC\include\string(643): error C3861: '_Stodx': identifier not
found
1>c:\Program Files (x86)\Microsoft Visual Studio
10.0\VC\include\string(659): error C2039: '_Stoldx' : is not a member
of '`global namespace''
1>c:\Program Files (x86)\Microsoft Visual Studio
10.0\VC\include\string(659): error C3861: '_Stoldx': identifier not
found

The problem will not be there for C-only code (#include <stdio.h>...),
and as mentioned, also not in another C++ project.

Does anyone have a hint what could be causing this or at least how to
debug it? I tried 2 independent Windows 7 / MSVC 2010 installation and
found the same behavior.

Thanks
Dominik


More information about the CMake mailing list