From 37e4a38eb547942da7b0d4e901d02632918a0cf0 Mon Sep 17 00:00:00 2001 From: Jos Decoster Date: Sat, 5 May 2012 23:56:49 +0200 Subject: [PATCH] Fix compile error with Visual C++ 2008 File decoder.cpp does not compile with Visual C++ 2008: 1>c:\tmp\libzmq\src\decoder.cpp(117) : warning C4003: not enough actual parameters for macro 'max' 1>c:\tmp\libzmq\src\decoder.cpp(117) : error C2589: '(' : illegal token on right side of '::' 1>c:\tmp\libzmq\src\decoder.cpp(117) : error C2059: syntax error : '::' 1>c:\tmp\libzmq\src\decoder.cpp(117) : error C2143: syntax error : missing ';' before '{' This error is caused by the precense of a macro 'max' when including 'windows.h'. To solve this problem, the preprocessor macro /DNOMINMAX must be specified. --- builds/msvc/libzmq/libzmq.vcproj | 1 + 1 file changed, 1 insertion(+) diff --git a/builds/msvc/libzmq/libzmq.vcproj b/builds/msvc/libzmq/libzmq.vcproj index cfa949d4..42c88058 100644 --- a/builds/msvc/libzmq/libzmq.vcproj +++ b/builds/msvc/libzmq/libzmq.vcproj @@ -42,6 +42,7 @@ Name="VCCLCompilerTool" AdditionalOptions="-DDLL_EXPORT -DFD_SETSIZE=1024 -D_CRT_SECURE_NO_WARNINGS" Optimization="0" + PreprocessorDefinitions="NOMINMAX" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3"