模块机器类型'x64'与目标机器类型'X86'冲突

时间:2017-07-24 18:17:49

标签: c++ qt msbuild

我正在尝试编译依赖于Qt 5.9.1模块的C ++程序,并收到以下错误消息:

Qt5Widgets.lib(Qt5Widgets.dll) : fatal error LNK1112:
module machine type 'x64' conflicts with target machine type 'X86'

我在Windows 10 x64上使用命令行MSBuild(来自Visual Studio Community 2017)。当我从之前的问题中学习时,问题似乎是Qt 5.9.1模块是x64,而MSBuild假设我的程序是x86。我已尝试在Developer Command Promptx64 Native Tools Command Promptx64_x86 Cross Tools Command Promptx86 Native Tools Command Promptx86_x64 Cross Tools Command Prompt上运行汇编的最佳解决方案。这些都不起作用,我仍然得到相同的错误消息。我没有使用Visual Studio IDE,只是命令行上的MSBuild,CMake和生成器设置为“Visual Studio 15 2017 Win64”。我还了解到没有已知方法可以明确指示MSBuild进行x64构建。有没有其他方法可以解决这个问题?我错过了以前的答案?有没有办法在CMake中强制执行此操作?

0 个答案:

没有答案