2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 <2016> 2017 2018 2019 2020 2021 2022 2023 2024 | Index | 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 <2016> 2017 2018 2019 2020 2021 2022 2023 2024 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Build problem in pvData with VS 2015 |
From: | Mark Rivers <[email protected]> |
To: | "[email protected]" <[email protected]> |
Date: | Fri, 9 Sep 2016 22:36:16 +0000 |
Folks, I am testing the master branch of pvDataCPP. I built successfully on linux-x86, vxWorks-ppc32, window-x64-static with Visual Studio 2010, win32-x86-mingw, and win32-x86-mingw-static. However, I got the following errors when I built on Visual Studio 2015, windows-x64-static. make[2]: Entering directory 'H:/epics/pvPackageCPP-3.15/pvData/src/O.windows-x64-static-vs2015' cl -EHsc -GR -nologo -D__STDC__=0 -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -Ox -GL -Oy- -W3 -w44355 -MT -TP -I. -I../O.Common -I. -I. -I.. -I../../src/misc -I../../src/pv -I../../src/factory -I../../src/property -I../../src/copy -I../../src/pvMisc -I../../src/monitor -I../../include/compiler/msvc -I../../include/os/W IN32 -I../../include -IH:/epics/base-3.15.4/include/compiler/msvc -IH:/epics/base-3.15.4/include/os/WIN32 -IH:/epics/base-3.15.4/include -IH:/epics/pvPackageCPP-3.15/pvDatabas e/include -IH:/epics/pvPackageCPP-3.15/pvaSrv/include -IH:/epics/pvPackageCPP-3.15/pvaClient/include -IH:/epics/pvPackageCPP-3.15/pvAccess/include -IH:/epics/pvPackageCPP-3 .15/normativeTypes/include -IH:/epics/pvPackageCPP-3.15/pvData/include -IH:/epics/pvPackageCPP-3.15/pvCommon/include -c ../../src/misc/bitSet.cpp bitSet.cpp C:\Program Files (x86)\Windows Kits\8.1\include\um\dbghelp.h(1544): warning C4091: 'typedef ': ignored on left of '' when no variable is declared C:\Program Files (x86)\Windows Kits\8.1\include\um\dbghelp.h(3190): warning C4091: 'typedef ': ignored on left of '' when no variable is declared ../../src/misc/bitSet.cpp(71): error C2039: 'max': is not a member of 'std' ..\pv/pvIntrospect.h(1312): note: see declaration of 'std' ../../src/misc/bitSet.cpp(71): error C3861: 'max': identifier not found ../../src/misc/bitSet.cpp(178): warning C4267: 'return': conversion from 'size_t' to 'epics::pvData::int32', possible loss of data ../../src/misc/bitSet.cpp(195): warning C4267: 'return': conversion from 'size_t' to 'epics::pvData::uint32', possible loss of data ../../src/misc/bitSet.cpp(203): error C2039: 'min': is not a member of 'std' ..\pv/pvIntrospect.h(1312): note: see declaration of 'std' ../../src/misc/bitSet.cpp(203): error C3861: 'min': identifier not found ../../src/misc/bitSet.cpp(217): error C2039: 'max': is not a member of 'std' ..\pv/pvIntrospect.h(1312): note: see declaration of 'std' ../../src/misc/bitSet.cpp(217): error C3861: 'max': identifier not found ../../src/misc/bitSet.cpp(229): error C2039: 'max': is not a member of 'std' ..\pv/pvIntrospect.h(1312): note: see declaration of 'std' ../../src/misc/bitSet.cpp(229): error C3861: 'max': identifier not found ../../src/misc/bitSet.cpp(254): error C2039: 'min': is not a member of 'std' ..\pv/pvIntrospect.h(1312): note: see declaration of 'std' ../../src/misc/bitSet.cpp(254): error C3861: 'min': identifier not found ../../src/misc/bitSet.cpp(255): error C2039: 'max': is not a member of 'std' ..\pv/pvIntrospect.h(1312): note: see declaration of 'std' ../../src/misc/bitSet.cpp(255): error C3861: 'max': identifier not found ../../src/misc/bitSet.cpp(287): warning C4267: 'initializing': conversion from 'size_t' to 'epics::pvData::uint32', possible loss of data H:/epics/base-3.15.4/configure/RULES_BUILD:234: recipe for target 'bitSet.obj' failed make[2]: *** [bitSet.obj] Error 2 make[2]: Leaving directory 'H:/epics/pvPackageCPP-3.15/pvData/src/O.windows-x64-static-vs2015' H:/epics/base-3.15.4/configure/RULES_ARCHS:61: recipe for target 'install.windows-x64-static-vs2015' failed make[1]: *** [install.windows-x64-static-vs2015] Error 2 make[1]: Leaving directory 'H:/epics/pvPackageCPP-3.15/pvData/src' H:/epics/base-3.15.4/configure/RULES_DIRS:88: recipe for target 'src.install' failed make: *** [src.install] Error 2 A Google search provided the solution, which is to include <algorithm>. Here is the fix: corvette:epics/pvPackageCPP-3.15/pvData>git diff diff --git a/src/misc/bitSet.cpp b/src/misc/bitSet.cpp index f9b6798..596ad11 100644 --- a/src/misc/bitSet.cpp +++ b/src/misc/bitSet.cpp @@ -10,6 +10,7 @@ #include <stdio.h> #include <iostream> #include <stdexcept> +#include <algorithm> With this change pvData compiles with Visual Studio 2015. Mark |