Issue description:
Hi,
Recently, we updated the commit of Cppcheck, and it built failed under msvc x86 mode due to the errors like below. Could you please take a look? Thanks.
Repro steps:
1. git clone https://github.com/danmar/cppcheck F:\gitP\danmar\cppcheck
2. mkdir F:\gitP\danmar\cppcheck\build_x86 and cd F:\gitP\danmar\cppcheck\build_x86
3. cmake -G "Visual Studio 16 2019" -A Win32 -DCMAKE_SYSTEM_VERSION=10.0.18362.0 -DCMAKE_BUILD_TYPE=Release
4. msbuild /m /p:Platform=Win32 /p:Configuration=Release Cppcheck.sln /t:Rebuild 2>&1
More info:
Windows: windows server 2019
VS: VS2019 (vs16.11.11)
The commit of Cppcheck we currently use: 343d04f, it reported error as above.
The earlier commit: dbc8078 is built fine.
Thanks for your detailed report, I can reproduce the issue. However, I'm not familiar with CMake, so I don't know what causes the problem.
As a workaround, could you use the provided solution file?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Issue description:
Hi,
Recently, we updated the commit of Cppcheck, and it built failed under msvc x86 mode due to the errors like below. Could you please take a look? Thanks.
Excepted result:
build successfully.
Repro steps:
1. git clone https://github.com/danmar/cppcheck F:\gitP\danmar\cppcheck
2. mkdir F:\gitP\danmar\cppcheck\build_x86 and cd F:\gitP\danmar\cppcheck\build_x86
3. cmake -G "Visual Studio 16 2019" -A Win32 -DCMAKE_SYSTEM_VERSION=10.0.18362.0 -DCMAKE_BUILD_TYPE=Release
4. msbuild /m /p:Platform=Win32 /p:Configuration=Release Cppcheck.sln /t:Rebuild 2>&1
More info:
Windows: windows server 2019
VS: VS2019 (vs16.11.11)
The commit of Cppcheck we currently use: 343d04f, it reported error as above.
The earlier commit: dbc8078 is built fine.
I attached a log file.
Last edit: June Liu 2022-06-28
Thanks for your detailed report, I can reproduce the issue. However, I'm not familiar with CMake, so I don't know what causes the problem.
As a workaround, could you use the provided solution file?
Thanks for looking this issue. I tried the workaround you said, it works, thank you.