Skip to content

Build fails on windows-x64 with VS2022 Community Edition #40

@MarkRivers

Description

@MarkRivers

I am building with VS2022 Community Edition. The current master branch builds OK with windows-x64-static. However, it fails with windows-x64 (dynamic build) as follows:

J:\epics\devel\areaDetector-3-14\ffmpegServer>make -sj
ffmpegCommon.cpp
ffmpegServer.cpp
ffmpegFile.cpp
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.42.34433\include\xlocnum(1028): error C2065: 'PTRDIFF_MAX': undeclared identifier
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.42.34433\include\xlocnum(1028): note: the template instantiation context (the oldest one first) is
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.42.34433\include\xlocnum(1662): note: see reference to class template instantiation 'std::num_get<wchar_t,std::istreambuf_iterator<wchar_t,std::char_traits<wchar_t>>>' being compiled
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.42.34433\include\xlocnum(589): note: while compiling class template member function '_InIt std::num_get<wchar_t,_InIt>::do_get(_InIt,_InIt,std::ios_base &,std::ios_base::iostate &,double &) const'
        with
        [
            _InIt=std::istreambuf_iterator<wchar_t,std::char_traits<wchar_t>>
        ]
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.42.34433\include\xlocnum(623): note: see the first reference to 'std::num_get<wchar_t,std::istreambuf_iterator<wchar_t,std::char_traits<wchar_t>>>::do_get' in 'std::num_get<wchar_t,std::istreambuf_iterator<wchar_t,std::char_traits<wchar_t>>>::do_get'
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.42.34433\include\xlocnum(594): note: see reference to function template instantiation 'std::_Num_get_parse_result std::num_get<wchar_t,std::istreambuf_iterator<wchar_t,std::char_traits<wchar_t>>>::_Parse_fp_with_locale<0>(char *const ,const int,_InIt &,_InIt &,const std::locale &)' being compiled
        with
        [
            _InIt=std::istreambuf_iterator<wchar_t,std::char_traits<wchar_t>>
        ]
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.42.34433\include\xlocnum(1029): error C2065: 'PTRDIFF_MAX': undeclared identifier
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.42.34433\include\xlocnum(1030): error C2065: 'PTRDIFF_MAX': undeclared identifier
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.42.34433\include\xlocnum(1033): error C2065: 'PTRDIFF_MAX': undeclared identifier
make[3]: *** [H:/epics-devel/base-7.0.8/configure/RULES_BUILD:267: ffmpegCommon.obj] Error 2

However, if I comment out this line in the Makefile it builds fine on both windows-x64-static and windows-x64:

diff --git a/ffmpegServerApp/src/Makefile b/ffmpegServerApp/src/Makefile
index b992352..56e2239 100644
--- a/ffmpegServerApp/src/Makefile
+++ b/ffmpegServerApp/src/Makefile
@@ -24,7 +24,7 @@ USR_CXXFLAGS += -U_GNU_SOURCE
 endif

 # For some reason the windows build needs stdint.h and inttypes.h
-USR_INCLUDES_WIN32 += -I$(TOP)/vendor/msinttypes
+#USR_INCLUDES_WIN32 += -I$(TOP)/vendor/msinttypes

 # And we need to switch nullhttpd to win32 mode
 USR_CXXFLAGS_WIN32 += -DWIN32

Does anyone know what versions of VS require those stdint.h and inttype.h files?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions