[CMake] Problems with MSVC 2010 generator
Mateusz Loskot
mateusz at loskot.net
Mon Jul 9 07:24:01 EDT 2012
On 9 July 2012 12:12, Dominik Szczerba <dominik at itis.ethz.ch> wrote:
> 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''
Are you sure you haven't messed with _HAS_CPP0X macro?
> The problem will not be there for C-only code (#include <stdio.h>...),
> and as mentioned, also not in another C++ project.
# CMakeLists.txt
project(Minimal)
cmake_minimum_required(VERSION 2.8.0)
add_executable(minimal test.cxx)
// test.cxx
#include <iostream>
int main() {}
Everything compiles for me using Visual Studio 2010 (*without* SP1)
Or, show your minimal CMakeLists.txt
Best regards,
--
Mateusz Loskot, http://mateusz.loskot.net
More information about the CMake
mailing list