Uploaded image for project: 'Qpid'
  1. Qpid
  2. QPID-8609

Compilation issues on Visual Studio 2022 Windows 10

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • qpid-cpp-1.38.0
    • qpid-cpp-1.40.0
    • C++ Build
    • None

    Description

      C:/PROGRA~1/MICROS~2/2022/ENTERP~1/Common7/IDE/COMMON~1/MICROS~1/CMake/CMake/bin/cmcldeps.exe RC C:\Users\jdanek\Source\Repos\jiridanek\qpid-cpp\out\build\x64-Debug\src\windows\resources\qpidcommon-resource.rc src\CMakeFiles\qpidcommon.dir\windows\resources\qpidcommon-resource.rc.res.d src\CMakeFiles\qpidcommon.dir\windows\resources\qpidcommon-resource.rc.res "Note: including file: " "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.33.31629/bin/Hostx64/x64/cl.exe" C:\PROGRA~2\WI3CF2~1\10\bin\100190~1.0\x64\rc.exe -Dqpidcommon_EXPORTS -I C:\Users\jdanek\Source\Repos\jiridanek\qpid-cpp\src\windows\resources -I C:\src\vcpkg\installed\x64-windows\include -I C:\Users\jdanek\Source\Repos\jiridanek\qpid-cpp\src -I C:\Users\jdanek\Source\Repos\jiridanek\qpid-cpp\src\..\include -I C:\Users\jdanek\Source\Repos\jiridanek\qpid-cpp\out\build\x64-Debug\src -I C:\Users\jdanek\Source\Repos\jiridanek\qpid-cpp\out\build\x64-Debug\src\..\include -DWIN32 -D_DEBUG   /w44996 /D _CRT_NONSTDC_NO_WARNINGS /D NOMINMAX /D WIN32_LEAN_AND_MEAN /wd4244 /wd4800 /wd4355 /wd4267 /D _WIN32_WINNT=0x0502 /D BOOST_ALL_DYN_LINK /fo src\CMakeFiles\qpidcommon.dir\windows\resources\qpidcommon-resource.rc.res C:\Users\jdanek\Source\Repos\jiridanek\qpid-cpp\out\build\x64-Debug\src\windows\resources\qpidcommon-resource.rc
      
      C:\Users\jdanek\Source\Repos\jiridanek\qpid-cpp\out\build\x64-Debug\EXEC : fatal error RC1106: invalid option: -44996
      

      Looks like it is caused by this definition in CMakeLists.txt

      if (MSVC)
        # Chaxnge warning C4996 from level 1 to level 4. These are real and shouldn't
        # be completely ignored, but they're pretty well checked out and will throw
        # a run-time error if violated.
        # "warning C4996: 'std::equal': Function call with parameters that may
        # be unsafe..."
        add_definitions(/w44996)
      endif (MSVC)
      

      According to latest docs, the switch to turn this off is /wd4996 https://learn.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-3-c4996?view=msvc-170 and that should work in Visual Studio 2015 and up, so it makes sense to me to change this.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            jdanek Jiri Daněk
            jdanek Jiri Daněk
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment