Search code examples
visual-c++c++20visual-studio-2022vcpkglive555

Install Live555 missing member "test" of "std::atomic_flag" | install Live555 using C++20


I am currently trying to compile Live555 to use it in a C++ project. Unfortunately, I am not even able to compile it properly.

I have tried to compile it like in the documentation from here which failed because of the error "GroupsockHelper.cpp(46): fatal error C1083: file (Include) cannot be accessed: "ifaddrs.h": No such file or directory" (translated).

This bug is fixed when using vcpkg. But using vcpkg leads to another error. Running "vcpkg install live555:x64-windows" will result in the error: "BasicUsageEnvironment\BasicTaskScheduler.cpp(191): error C2039: 'test': is not a member of 'std::atomic_flag'".

When I followed this error, I came across this where it says that "test" is part of "std::atomic_flag" since C++20. Now I fail to get any information on how to compile it with the C++20 Standard. Some sources (e.g. this) state, that the the C++ Standard should be changed in Visual Studio, which seems wrong to me and also does not work. Then I also tried this command (which I found somewhere I cant recap) "vcpkg install live555:x64-windows --feature-flags=manifests,c++latest"/ "vcpkg install live555:x64-windows --feature-flags=manifests,c++20". This does not work either. It always leads to the C2039 error.

I think that I dont really understand what the MSVC is and what to do that MSVC/CMake uses C++20 when running vcpkg.

I am using Visual Studio 2022 Enterprise on Windows 10. MSVC installation in VS is v143. The cmd says it runs on "Visual Studio 2022 Developer Command Prompt v17.6.4" for x64.

I hope that this makes it roughly clear where my actual problem lies and why I cannot solve it by myself.

I tried:

  • to follow the Live555 documentation,
  • using vcpkg with "vcpkg install live555:x64-windows"
  • to change the VS properties like here
  • to used vcpkg flags like "vcpkg install live555:x64-windows --feature-flags=manifests,c++20"
  • of course to google how to use C++20, but to no avail

The cmd:

C:\User\Git\Project\vcpkg>vcpkg install live555:x64-windows
Computing installation plan...
The following packages will be built and installed:
    live555:x64-windows -> 2023-06-20#1
Detecting compiler hash for triplet x64-windows...
Restored 0 package(s) from C:\User\AppData\Local\vcpkg\archives in 288 us. Use --debug to see more details.
Installing 1/1 live555:x64-windows...
Building live555:x64-windows...
-- Note: live555 only supports static library linkage. Building static library.
-- Using cached live.2023.06.20.tar.gz.
-- Cleaning sources at C:/User/Git/Project/vcpkg/buildtrees/live555/src/live-5764da9fde.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source C:/User/Git/Project/vcpkg/downloads/live.2023.06.20.tar.gz
-- Applying patch fix-RTSPClient.patch
-- Using source at C:/User/Git/Project/vcpkg/buildtrees/live555/src/live-5764da9fde.clean
-- Found external ninja('1.11.0').
-- Configuring x64-windows
-- Building x64-windows-dbg
CMake Error at scripts/cmake/vcpkg_execute_build_process.cmake:134 (message):
    Command failed: "C:/Program Files/CMake/bin/cmake.exe" --build . --config Debug --target install -- -v -j13
    Working Directory: C:/User/Git/Project/vcpkg/buildtrees/live555/x64-windows-dbg
    See logs for more information:
      C:\User\Git\Project\vcpkg\buildtrees\live555\install-x64-windows-dbg-out.log

Call Stack (most recent call first):
  installed/x64-windows/share/vcpkg-cmake/vcpkg_cmake_build.cmake:74 (vcpkg_execute_build_process)
  installed/x64-windows/share/vcpkg-cmake/vcpkg_cmake_install.cmake:16 (vcpkg_cmake_build)
  ports/live555/portfile.cmake:22 (vcpkg_cmake_install)
  scripts/ports.cmake:147 (include)

The install-x64-windows-dbg-out.log:

Change Dir: '[Path]/buildtrees/live555/x64-windows-dbg'

Run Build Command(s): "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja/ninja.exe" -v -v -j13 install
[1/202] C:\PROGRA~1\MIB055~1\2022\ENTERP~1\VC\Tools\MSVC\1436~1.325\bin\Hostx64\x64\cl.exe   -DNO_GETIFADDRS -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\BasicUsageEnvironment\include -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\groupsock\include -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\liveMedia\include -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\UsageEnvironment\include /nologo /DWIN32 /D_WINDOWS /W3 /utf-8 /MP  /D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 /showIncludes /FoCMakeFiles\groupsock.dir\groupsock\inet.c.obj /FdCMakeFiles\groupsock.dir\groupsock.pdb /FS -c [Path]\buildtrees\live555\src\live-5764da9fde.clean\groupsock\inet.c
[Path]\buildtrees\live555\src\live-5764da9fde.clean\groupsock\inet.c(268): warning C4244: '=': conversion from '__int64' to 'long', possible loss of data
[Path]\buildtrees\live555\src\live-5764da9fde.clean\groupsock\inet.c(303): warning C4244: '=': conversion from '__int64' to 'long', possible loss of data
[Path]\buildtrees\live555\src\live-5764da9fde.clean\groupsock\inet.c(334): warning C4244: '=': conversion from '__int64' to 'long', possible loss of data
[2/202] C:\PROGRA~1\MIB055~1\2022\ENTERP~1\VC\Tools\MSVC\1436~1.325\bin\Hostx64\x64\cl.exe   /TP -DNO_GETIFADDRS -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\BasicUsageEnvironment\include -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\groupsock\include -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\liveMedia\include -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\UsageEnvironment\include /nologo /DWIN32 /D_WINDOWS /W3 /utf-8 /GR /EHsc /MP  /D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 /showIncludes /FoCMakeFiles\groupsock.dir\groupsock\GroupEId.cpp.obj /FdCMakeFiles\groupsock.dir\groupsock.pdb /FS -c [Path]\buildtrees\live555\src\live-5764da9fde.clean\groupsock\GroupEId.cpp
[3/202] C:\PROGRA~1\MIB055~1\2022\ENTERP~1\VC\Tools\MSVC\1436~1.325\bin\Hostx64\x64\cl.exe   /TP -DNO_GETIFADDRS -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\BasicUsageEnvironment\include -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\groupsock\include -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\liveMedia\include -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\UsageEnvironment\include /nologo /DWIN32 /D_WINDOWS /W3 /utf-8 /GR /EHsc /MP  /D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 /showIncludes /FoCMakeFiles\groupsock.dir\groupsock\IOHandlers.cpp.obj /FdCMakeFiles\groupsock.dir\groupsock.pdb /FS -c [Path]\buildtrees\live555\src\live-5764da9fde.clean\groupsock\IOHandlers.cpp
[4/202] C:\PROGRA~1\MIB055~1\2022\ENTERP~1\VC\Tools\MSVC\1436~1.325\bin\Hostx64\x64\cl.exe   /TP -DNO_GETIFADDRS -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\BasicUsageEnvironment\include -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\groupsock\include -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\liveMedia\include -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\UsageEnvironment\include /nologo /DWIN32 /D_WINDOWS /W3 /utf-8 /GR /EHsc /MP  /D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 /showIncludes /FoCMakeFiles\BasicUsageEnvironment.dir\BasicUsageEnvironment\DelayQueue.cpp.obj /FdCMakeFiles\BasicUsageEnvironment.dir\BasicUsageEnvironment.pdb /FS -c [Path]\buildtrees\live555\src\live-5764da9fde.clean\BasicUsageEnvironment\DelayQueue.cpp
[5/202] C:\PROGRA~1\MIB055~1\2022\ENTERP~1\VC\Tools\MSVC\1436~1.325\bin\Hostx64\x64\cl.exe   /TP -DNO_GETIFADDRS -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\BasicUsageEnvironment\include -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\groupsock\include -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\liveMedia\include -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\UsageEnvironment\include /nologo /DWIN32 /D_WINDOWS /W3 /utf-8 /GR /EHsc /MP  /D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 /showIncludes /FoCMakeFiles\BasicUsageEnvironment.dir\BasicUsageEnvironment\BasicHashTable.cpp.obj /FdCMakeFiles\BasicUsageEnvironment.dir\BasicUsageEnvironment.pdb /FS -c [Path]\buildtrees\live555\src\live-5764da9fde.clean\BasicUsageEnvironment\BasicHashTable.cpp
[6/202] C:\PROGRA~1\MIB055~1\2022\ENTERP~1\VC\Tools\MSVC\1436~1.325\bin\Hostx64\x64\cl.exe   /TP -DNO_GETIFADDRS -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\BasicUsageEnvironment\include -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\groupsock\include -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\liveMedia\include -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\UsageEnvironment\include /nologo /DWIN32 /D_WINDOWS /W3 /utf-8 /GR /EHsc /MP  /D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 /showIncludes /FoCMakeFiles\groupsock.dir\groupsock\NetAddress.cpp.obj /FdCMakeFiles\groupsock.dir\groupsock.pdb /FS -c [Path]\buildtrees\live555\src\live-5764da9fde.clean\groupsock\NetAddress.cpp
[Path]\buildtrees\live555\src\live-5764da9fde.clean\groupsock\NetAddress.cpp(479): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
[7/202] C:\PROGRA~1\MIB055~1\2022\ENTERP~1\VC\Tools\MSVC\1436~1.325\bin\Hostx64\x64\cl.exe   /TP -DNO_GETIFADDRS -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\BasicUsageEnvironment\include -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\groupsock\include -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\liveMedia\include -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\UsageEnvironment\include /nologo /DWIN32 /D_WINDOWS /W3 /utf-8 /GR /EHsc /MP  /D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 /showIncludes /FoCMakeFiles\BasicUsageEnvironment.dir\BasicUsageEnvironment\BasicTaskScheduler0.cpp.obj /FdCMakeFiles\BasicUsageEnvironment.dir\BasicUsageEnvironment.pdb /FS -c [Path]\buildtrees\live555\src\live-5764da9fde.clean\BasicUsageEnvironment\BasicTaskScheduler0.cpp
[8/202] C:\PROGRA~1\MIB055~1\2022\ENTERP~1\VC\Tools\MSVC\1436~1.325\bin\Hostx64\x64\cl.exe   /TP -DNO_GETIFADDRS -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\BasicUsageEnvironment\include -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\groupsock\include -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\liveMedia\include -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\UsageEnvironment\include /nologo /DWIN32 /D_WINDOWS /W3 /utf-8 /GR /EHsc /MP  /D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 /showIncludes /FoCMakeFiles\BasicUsageEnvironment.dir\BasicUsageEnvironment\BasicUsageEnvironment.cpp.obj /FdCMakeFiles\BasicUsageEnvironment.dir\BasicUsageEnvironment.pdb /FS -c [Path]\buildtrees\live555\src\live-5764da9fde.clean\BasicUsageEnvironment\BasicUsageEnvironment.cpp
[9/202] C:\PROGRA~1\MIB055~1\2022\ENTERP~1\VC\Tools\MSVC\1436~1.325\bin\Hostx64\x64\cl.exe   /TP -DNO_GETIFADDRS -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\BasicUsageEnvironment\include -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\groupsock\include -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\liveMedia\include -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\UsageEnvironment\include /nologo /DWIN32 /D_WINDOWS /W3 /utf-8 /GR /EHsc /MP  /D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 /showIncludes /FoCMakeFiles\groupsock.dir\groupsock\GroupsockHelper.cpp.obj /FdCMakeFiles\groupsock.dir\groupsock.pdb /FS -c [Path]\buildtrees\live555\src\live-5764da9fde.clean\groupsock\GroupsockHelper.cpp
[Path]\buildtrees\live555\src\live-5764da9fde.clean\groupsock\GroupsockHelper.cpp(104): warning C4244: '=': conversion from 'SOCKET' to 'int', possible loss of data
[Path]\buildtrees\live555\src\live-5764da9fde.clean\groupsock\GroupsockHelper.cpp(170): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
[Path]\buildtrees\live555\src\live-5764da9fde.clean\groupsock\GroupsockHelper.cpp(190): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
[Path]\buildtrees\live555\src\live-5764da9fde.clean\groupsock\GroupsockHelper.cpp(342): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
[Path]\buildtrees\live555\src\live-5764da9fde.clean\groupsock\GroupsockHelper.cpp(361): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
[Path]\buildtrees\live555\src\live-5764da9fde.clean\groupsock\GroupsockHelper.cpp(456): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
[Path]\buildtrees\live555\src\live-5764da9fde.clean\groupsock\GroupsockHelper.cpp(991): warning C4996: 'ctime': This function or variable may be unsafe. Consider using ctime_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
[Path]\buildtrees\live555\src\live-5764da9fde.clean\groupsock\GroupsockHelper.cpp(993): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
[Path]\buildtrees\live555\src\live-5764da9fde.clean\groupsock\GroupsockHelper.cpp(1043): warning C4244: '=': conversion from 'time_t' to 'long', possible loss of data
[10/202] C:\PROGRA~1\MIB055~1\2022\ENTERP~1\VC\Tools\MSVC\1436~1.325\bin\Hostx64\x64\cl.exe   /TP -DNO_GETIFADDRS -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\BasicUsageEnvironment\include -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\groupsock\include -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\liveMedia\include -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\UsageEnvironment\include /nologo /DWIN32 /D_WINDOWS /W3 /utf-8 /GR /EHsc /MP  /D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 /showIncludes /FoCMakeFiles\BasicUsageEnvironment.dir\BasicUsageEnvironment\BasicUsageEnvironment0.cpp.obj /FdCMakeFiles\BasicUsageEnvironment.dir\BasicUsageEnvironment.pdb /FS -c [Path]\buildtrees\live555\src\live-5764da9fde.clean\BasicUsageEnvironment\BasicUsageEnvironment0.cpp
[Path]\buildtrees\live555\src\live-5764da9fde.clean\BasicUsageEnvironment\BasicUsageEnvironment0.cpp(79): warning C4996: '_snprintf': This function or variable may be unsafe. Consider using _snprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
[Path]\buildtrees\live555\src\live-5764da9fde.clean\BasicUsageEnvironment\BasicUsageEnvironment0.cpp(93): warning C4267: 'initializing': conversion from 'size_t' to 'unsigned int', possible loss of data
[11/202] C:\PROGRA~1\MIB055~1\2022\ENTERP~1\VC\Tools\MSVC\1436~1.325\bin\Hostx64\x64\cl.exe   /TP -DNO_GETIFADDRS -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\BasicUsageEnvironment\include -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\groupsock\include -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\liveMedia\include -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\UsageEnvironment\include /nologo /DWIN32 /D_WINDOWS /W3 /utf-8 /GR /EHsc /MP  /D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 /showIncludes /FoCMakeFiles\BasicUsageEnvironment.dir\BasicUsageEnvironment\BasicTaskScheduler.cpp.obj /FdCMakeFiles\BasicUsageEnvironment.dir\BasicUsageEnvironment.pdb /FS -c [Path]\buildtrees\live555\src\live-5764da9fde.clean\BasicUsageEnvironment\BasicTaskScheduler.cpp
FAILED: CMakeFiles/BasicUsageEnvironment.dir/BasicUsageEnvironment/BasicTaskScheduler.cpp.obj 
C:\PROGRA~1\MIB055~1\2022\ENTERP~1\VC\Tools\MSVC\1436~1.325\bin\Hostx64\x64\cl.exe   /TP -DNO_GETIFADDRS -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\BasicUsageEnvironment\include -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\groupsock\include -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\liveMedia\include -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\UsageEnvironment\include /nologo /DWIN32 /D_WINDOWS /W3 /utf-8 /GR /EHsc /MP  /D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 /showIncludes /FoCMakeFiles\BasicUsageEnvironment.dir\BasicUsageEnvironment\BasicTaskScheduler.cpp.obj /FdCMakeFiles\BasicUsageEnvironment.dir\BasicUsageEnvironment.pdb /FS -c [Path]\buildtrees\live555\src\live-5764da9fde.clean\BasicUsageEnvironment\BasicTaskScheduler.cpp
[Path]\buildtrees\live555\src\live-5764da9fde.clean\BasicUsageEnvironment\BasicTaskScheduler.cpp(100): warning C4244: '=': conversion from 'SOCKET' to 'int', possible loss of data

[ERROR HERE VVV]
**[Path]\buildtrees\live555\src\live-5764da9fde.clean\BasicUsageEnvironment\BasicTaskScheduler.cpp(191): error C2039: 'test': is not a member of 'std::atomic_flag'
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.36.32532\include\atomic(2826): note: see declaration of 'std::atomic_flag'**
[ERROR HERE ^^^]

[12/202] C:\PROGRA~1\MIB055~1\2022\ENTERP~1\VC\Tools\MSVC\1436~1.325\bin\Hostx64\x64\cl.exe   /TP -DNO_GETIFADDRS -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\BasicUsageEnvironment\include -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\groupsock\include -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\liveMedia\include -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\UsageEnvironment\include /nologo /DWIN32 /D_WINDOWS /W3 /utf-8 /GR /EHsc /MP  /D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 /showIncludes /FoCMakeFiles\groupsock.dir\groupsock\NetInterface.cpp.obj /FdCMakeFiles\groupsock.dir\groupsock.pdb /FS -c [Path]\buildtrees\live555\src\live-5764da9fde.clean\groupsock\NetInterface.cpp
[Path]\buildtrees\live555\src\live-5764da9fde.clean\groupsock\NetInterface.cpp(98): warning C4312: 'type cast': conversion from 'long' to 'char *' of greater size
[Path]\buildtrees\live555\src\live-5764da9fde.clean\groupsock\NetInterface.cpp(103): warning C4312: 'type cast': conversion from 'long' to 'char *' of greater size
[Path]\buildtrees\live555\src\live-5764da9fde.clean\groupsock\NetInterface.cpp(115): warning C4312: 'type cast': conversion from 'long' to 'char *' of greater size
[13/202] C:\PROGRA~1\MIB055~1\2022\ENTERP~1\VC\Tools\MSVC\1436~1.325\bin\Hostx64\x64\cl.exe   /TP -DNO_GETIFADDRS -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\BasicUsageEnvironment\include -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\groupsock\include -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\liveMedia\include -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\UsageEnvironment\include /nologo /DWIN32 /D_WINDOWS /W3 /utf-8 /GR /EHsc /MP  /D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 /showIncludes /FoCMakeFiles\groupsock.dir\groupsock\Groupsock.cpp.obj /FdCMakeFiles\groupsock.dir\groupsock.pdb /FS -c [Path]\buildtrees\live555\src\live-5764da9fde.clean\groupsock\Groupsock.cpp
[Path]\buildtrees\live555\src\live-5764da9fde.clean\groupsock\Groupsock.cpp(401): warning C4312: 'type cast': conversion from 'long' to 'char *' of greater size
[Path]\buildtrees\live555\src\live-5764da9fde.clean\groupsock\Groupsock.cpp(403): warning C4312: 'type cast': conversion from 'long' to 'char *' of greater size
[Path]\buildtrees\live555\src\live-5764da9fde.clean\groupsock\Groupsock.cpp(431): warning C4312: 'type cast': conversion from 'long' to 'char *' of greater size
[Path]\buildtrees\live555\src\live-5764da9fde.clean\groupsock\Groupsock.cpp(440): warning C4312: 'type cast': conversion from 'long' to 'char *' of greater size
[Path]\buildtrees\live555\src\live-5764da9fde.clean\groupsock\Groupsock.cpp(423): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
[Path]\buildtrees\live555\src\live-5764da9fde.clean\groupsock\Groupsock.cpp(435): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
[Path]\buildtrees\live555\src\live-5764da9fde.clean\groupsock\Groupsock.cpp(453): warning C4312: 'type cast': conversion from 'long' to 'char *' of greater size
[14/202] C:\PROGRA~1\MIB055~1\2022\ENTERP~1\VC\Tools\MSVC\1436~1.325\bin\Hostx64\x64\cl.exe   /TP -DNO_GETIFADDRS -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\BasicUsageEnvironment\include -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\groupsock\include -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\liveMedia\include -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\UsageEnvironment\include -I[Path]\installed\x64-windows\include /nologo /DWIN32 /D_WINDOWS /W3 /utf-8 /GR /EHsc /MP  /D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 /showIncludes /FoCMakeFiles\liveMedia.dir\liveMedia\AC3AudioStreamFramer.cpp.obj /FdCMakeFiles\liveMedia.dir\liveMedia.pdb /FS -c [Path]\buildtrees\live555\src\live-5764da9fde.clean\liveMedia\AC3AudioStreamFramer.cpp
[15/202] C:\PROGRA~1\MIB055~1\2022\ENTERP~1\VC\Tools\MSVC\1436~1.325\bin\Hostx64\x64\cl.exe   /TP -DNO_GETIFADDRS -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\BasicUsageEnvironment\include -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\groupsock\include -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\liveMedia\include -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\UsageEnvironment\include -I[Path]\installed\x64-windows\include /nologo /DWIN32 /D_WINDOWS /W3 /utf-8 /GR /EHsc /MP  /D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 /showIncludes /FoCMakeFiles\liveMedia.dir\liveMedia\ADTSAudioStreamDiscreteFramer.cpp.obj /FdCMakeFiles\liveMedia.dir\liveMedia.pdb /FS -c [Path]\buildtrees\live555\src\live-5764da9fde.clean\liveMedia\ADTSAudioStreamDiscreteFramer.cpp
[16/202] C:\PROGRA~1\MIB055~1\2022\ENTERP~1\VC\Tools\MSVC\1436~1.325\bin\Hostx64\x64\cl.exe   /TP -DNO_GETIFADDRS -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\BasicUsageEnvironment\include -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\groupsock\include -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\liveMedia\include -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\UsageEnvironment\include -I[Path]\installed\x64-windows\include /nologo /DWIN32 /D_WINDOWS /W3 /utf-8 /GR /EHsc /MP  /D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 /showIncludes /FoCMakeFiles\liveMedia.dir\liveMedia\ADTSAudioFileSource.cpp.obj /FdCMakeFiles\liveMedia.dir\liveMedia.pdb /FS -c [Path]\buildtrees\live555\src\live-5764da9fde.clean\liveMedia\ADTSAudioFileSource.cpp
[Path]\buildtrees\live555\src\live-5764da9fde.clean\liveMedia\ADTSAudioFileSource.cpp(108): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
[Path]\buildtrees\live555\src\live-5764da9fde.clean\liveMedia\ADTSAudioFileSource.cpp(150): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data
[17/202] C:\PROGRA~1\MIB055~1\2022\ENTERP~1\VC\Tools\MSVC\1436~1.325\bin\Hostx64\x64\cl.exe   /TP -DNO_GETIFADDRS -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\BasicUsageEnvironment\include -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\groupsock\include -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\liveMedia\include -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\UsageEnvironment\include -I[Path]\installed\x64-windows\include /nologo /DWIN32 /D_WINDOWS /W3 /utf-8 /GR /EHsc /MP  /D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 /showIncludes /FoCMakeFiles\liveMedia.dir\liveMedia\AMRAudioFileSource.cpp.obj /FdCMakeFiles\liveMedia.dir\liveMedia.pdb /FS -c [Path]\buildtrees\live555\src\live-5764da9fde.clean\liveMedia\AMRAudioFileSource.cpp
[Path]\buildtrees\live555\src\live-5764da9fde.clean\liveMedia\AMRAudioFileSource.cpp(156): warning C4267: '=': conversion from 'size_t' to 'unsigned int', possible loss of data
[18/202] C:\PROGRA~1\MIB055~1\2022\ENTERP~1\VC\Tools\MSVC\1436~1.325\bin\Hostx64\x64\cl.exe   /TP -DNO_GETIFADDRS -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\BasicUsageEnvironment\include -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\groupsock\include -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\liveMedia\include -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\UsageEnvironment\include -I[Path]\installed\x64-windows\include /nologo /DWIN32 /D_WINDOWS /W3 /utf-8 /GR /EHsc /MP  /D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 /showIncludes /FoCMakeFiles\liveMedia.dir\liveMedia\AMRAudioFileSink.cpp.obj /FdCMakeFiles\liveMedia.dir\liveMedia.pdb /FS -c [Path]\buildtrees\live555\src\live-5764da9fde.clean\liveMedia\AMRAudioFileSink.cpp
[Path]\buildtrees\live555\src\live-5764da9fde.clean\liveMedia\AMRAudioFileSink.cpp(79): warning C4267: 'initializing': conversion from 'size_t' to 'unsigned int', possible loss of data
[Path]\buildtrees\live555\src\live-5764da9fde.clean\liveMedia\AMRAudioFileSink.cpp(76): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
[19/202] C:\PROGRA~1\MIB055~1\2022\ENTERP~1\VC\Tools\MSVC\1436~1.325\bin\Hostx64\x64\cl.exe   /TP -DNO_GETIFADDRS -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\BasicUsageEnvironment\include -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\groupsock\include -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\liveMedia\include -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\UsageEnvironment\include -I[Path]\installed\x64-windows\include /nologo /DWIN32 /D_WINDOWS /W3 /utf-8 /GR /EHsc /MP  /D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 /showIncludes /FoCMakeFiles\liveMedia.dir\liveMedia\AC3AudioRTPSource.cpp.obj /FdCMakeFiles\liveMedia.dir\liveMedia.pdb /FS -c [Path]\buildtrees\live555\src\live-5764da9fde.clean\liveMedia\AC3AudioRTPSource.cpp
[20/202] C:\PROGRA~1\MIB055~1\2022\ENTERP~1\VC\Tools\MSVC\1436~1.325\bin\Hostx64\x64\cl.exe   /TP -DNO_GETIFADDRS -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\BasicUsageEnvironment\include -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\groupsock\include -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\liveMedia\include -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\UsageEnvironment\include -I[Path]\installed\x64-windows\include /nologo /DWIN32 /D_WINDOWS /W3 /utf-8 /GR /EHsc /MP  /D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 /showIncludes /FoCMakeFiles\liveMedia.dir\liveMedia\AC3AudioRTPSink.cpp.obj /FdCMakeFiles\liveMedia.dir\liveMedia.pdb /FS -c [Path]\buildtrees\live555\src\live-5764da9fde.clean\liveMedia\AC3AudioRTPSink.cpp
[21/202] C:\PROGRA~1\MIB055~1\2022\ENTERP~1\VC\Tools\MSVC\1436~1.325\bin\Hostx64\x64\cl.exe   /TP -DNO_GETIFADDRS -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\BasicUsageEnvironment\include -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\groupsock\include -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\liveMedia\include -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\UsageEnvironment\include -I[Path]\installed\x64-windows\include /nologo /DWIN32 /D_WINDOWS /W3 /utf-8 /GR /EHsc /MP  /D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 /showIncludes /FoCMakeFiles\liveMedia.dir\liveMedia\ADTSAudioFileServerMediaSubsession.cpp.obj /FdCMakeFiles\liveMedia.dir\liveMedia.pdb /FS -c [Path]\buildtrees\live555\src\live-5764da9fde.clean\liveMedia\ADTSAudioFileServerMediaSubsession.cpp
[22/202] C:\PROGRA~1\MIB055~1\2022\ENTERP~1\VC\Tools\MSVC\1436~1.325\bin\Hostx64\x64\cl.exe   /TP -DNO_GETIFADDRS -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\BasicUsageEnvironment\include -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\groupsock\include -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\liveMedia\include -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\UsageEnvironment\include -I[Path]\installed\x64-windows\include /nologo /DWIN32 /D_WINDOWS /W3 /utf-8 /GR /EHsc /MP  /D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 /showIncludes /FoCMakeFiles\liveMedia.dir\liveMedia\AMRAudioFileServerMediaSubsession.cpp.obj /FdCMakeFiles\liveMedia.dir\liveMedia.pdb /FS -c [Path]\buildtrees\live555\src\live-5764da9fde.clean\liveMedia\AMRAudioFileServerMediaSubsession.cpp
[23/202] C:\PROGRA~1\MIB055~1\2022\ENTERP~1\VC\Tools\MSVC\1436~1.325\bin\Hostx64\x64\cl.exe   /TP -DNO_GETIFADDRS -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\BasicUsageEnvironment\include -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\groupsock\include -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\liveMedia\include -I[Path]\buildtrees\live555\src\live-5764da9fde.clean\UsageEnvironment\include -I[Path]\installed\x64-windows\include /nologo /DWIN32 /D_WINDOWS /W3 /utf-8 /GR /EHsc /MP  /D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 /showIncludes /FoCMakeFiles\liveMedia.dir\liveMedia\AC3AudioFileServerMediaSubsession.cpp.obj /FdCMakeFiles\liveMedia.dir\liveMedia.pdb /FS -c [Path]\buildtrees\live555\src\live-5764da9fde.clean\liveMedia\AC3AudioFileServerMediaSubsession.cpp
ninja: build stopped: subcommand failed.

Solution

  • In the project's CMakeLists.txt add the following line (or edit an existing one):

    set(CMAKE_CXX_STANDARD 20)
    

    That configuration setting changes the compiler options/features. For example, that option will add the /std:c++20 flag to the Microsoft C++ compiler. Equivalent flags are set for other compilers.