graehl / yaml-cpp-old

Automatically exported from code.google.com/p/yaml-cpp
MIT License
0 stars 0 forks source link

Build fails in Visual Studio 2013 (on Windows 8.1) #288

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Download source.
2. Run cmake, configure, and generate.
3. Open solution in Visual Studio Community 2013 (Version 12.0.31101.00 Update 
4) and build.

What is the expected output? What do you see instead?
I expect the build to succeed.  Instead I get the following:
3>------ Build started: Project: yaml-cpp static md, Configuration: Release x64 
------
...
3>  ostream_wrapper.cpp
3>C:\yaml-cpp-0.5.1\src\ostream_wrapper.cpp(24): error C2039: 'max' : is not a 
member of 'std'
3>C:\yaml-cpp-0.5.1\src\ostream_wrapper.cpp(24): error C3861: 'max': identifier 
not found
3>C:\yaml-cpp-0.5.1\src\ostream_wrapper.cpp(37): error C2039: 'max' : is not a 
member of 'std'
3>C:\yaml-cpp-0.5.1\src\ostream_wrapper.cpp(37): error C3861: 'max': identifier 
not found

What version of the product are you using? On what operating system?
Version 0.5.1 on Windows 8.1.

Please provide any additional information below.
Adding an include for <algorithm> at the top of ostream_wrapper.cpp fixes the 
issue, ala http://stackoverflow.com/a/19623033
Also, builds fine without any such addition in Visual Studio 2012 on my Windows 
7 machine.

Original issue reported on code.google.com by rbeas...@simquest.com on 25 Mar 2015 at 9:10

GoogleCodeExporter commented 9 years ago

Original comment by jbe...@gmail.com on 26 Mar 2015 at 1:47