我有一个在我的电脑上构建良好的 Cmake/wxWidgets 项目。我使用编译 wxWidgetsnmake /f makefile.vc BUILD=release TARGET_CPU=X86
并使用cmake .. -G "Visual Studio 16 2019" -A Win32 -DCMAKE_CONFIGURATION_TYPES=Release
.
就像我写的那样,这在我的电脑上编译得很好。当我想在 Windows 2019 Image 上使用 github 操作构建它时,我首先提取 wxWidgets,使用上述语句编译它,使用 aboce 语句生成 wxWidgets,并使用包含"%programfiles(x86)%\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\msbuild.exe" ".\build\NaCl-Configurator.sln" /p:Configuration=Release /p:Platform=Win32 /p:PlatformTarget=x86
但是这样做时,我总是会收到以下错误:
wxmsw31u_core.lib(corelib_wincmn.obj) : fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'x86' [D:\a\abc\abc\build\abc.vcxproj]
如果我将所有东西都切换到 x64,它编译得很好,但我需要一个 x86 版本。我缺少任何系统设置吗?