You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Jiri Daněk (Jira)" <ji...@apache.org> on 2023/04/16 10:04:00 UTC

[jira] [Resolved] (QPID-8609) Compilation issues on Visual Studio 2022 Windows 10

     [ https://issues.apache.org/jira/browse/QPID-8609?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jiri Daněk resolved QPID-8609.
------------------------------
    Resolution: Fixed

> Compilation issues on Visual Studio 2022 Windows 10
> ---------------------------------------------------
>
>                 Key: QPID-8609
>                 URL: https://issues.apache.org/jira/browse/QPID-8609
>             Project: Qpid
>          Issue Type: Bug
>          Components: C++ Build
>    Affects Versions: qpid-cpp-1.40.0
>            Reporter: Jiri Daněk
>            Assignee: Jiri Daněk
>            Priority: Major
>             Fix For: qpid-cpp-1.40.0
>
>
> {noformat}
> 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
> {noformat}
> {noformat}
> C:\Users\jdanek\Source\Repos\jiridanek\qpid-cpp\out\build\x64-Debug\EXEC : fatal error RC1106: invalid option: -44996
> {noformat}
> Looks like it is caused by this definition in CMakeLists.txt
> {code}
> 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)
> {code}
> 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.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org