I found a solution, it's by selecting a 32-bit CMake generator:
from the list of available generators, e.g. Visual Studio 17 2022
instead of Visual Studio 17 2022 Win64
.
Selecting x86-Release
doesn't seem to be enough.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi,
I'm using Visual Studio 2022 to build a project using CMake.
It builds successfully for x86_64 architecture.
However, when I did the following:
x86-Release
, from CMake Settings
Release
in Configuration Type msvc_x86
selected as a Toolset Visual Studio 17 2022 Win64
I got the configuration done for x86_64
instead of x86
:
Command line: "C:\WINDOWS\system32\cmd.exe" /c "%SYSTEMROOT%\System32\chcp.com 65001 >NUL && "C:\PROGRAM FILES\MICROSOFT VISUAL STUDIO\2022\COMMUNITY\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\CMake\bin\cmake.exe" -G "Visual Studio 17 2022" -A x64 -DCMAKE_CONFIGURATION_TYPES:STRING="Release" -DCMAKE_INSTALL_PREFIX:PATH="F:\Work\conan\crono_pci_windows\tools\out\install\x86-Release" "F:\Work\conan\crono_pci_windows\tools" 2>&1"
1>
While I expected the command line to have -A Win32 instead.
Any idea how to set it to build for x86 (-A Win32)?
Thanks,
Bassem
I found a solution, it's by selecting a 32-bit CMake generator:
from the list of available generators, e.g. Visual Studio 17 2022
instead of Visual Studio 17 2022 Win64
.
Selecting x86-Release
doesn't seem to be enough.