gpt4 book ai didi

c++ - 如何在Windows下编译Qt 4.6.3 for Windows Mobile (Windows CE)?

转载 作者:塔克拉玛干 更新时间:2023-11-03 02:24:30 26 4
gpt4 key购买 nike

LNK1112: module machine type ' X86' conflicts with target machine type 'THUMB'

我正在尝试为 Windows CE/Windows Mobile 构建 Qt,我正在遵循以下指南: http://doc.qt.io/archives/4.6/install-wince.html

这些是我到目前为止采取的步骤:

  1. 我下载了 qt-everywhere-opensource-src-4.6.3
  2. 解压到C:\Qt\qt-everywhere-opensource-src-4.6.3
  3. 打开 Visual Studio 命令提示符并运行以下命令 configure -platform win32-msvc2008 -xplatform wincewm60professional-msvc2008 -webkit -openssl -arch windowsce -opensource -qt-gif -qt-libjpeg -qt-libpng
  4. 配置步骤成功完成。
  5. 我尝试setcepaths wincewm60professional-msvc2008我收到以下错误

Could not find specified SDK: Windows Mobile 6 Professional SDK (ARMV4I)

'tmp_created_script_setup.bat' is not recognized as an internal or external command, operable program or batch file.

Could Not Find C:\Qt\qt-everywhere-opensource-src-4.6.3\tmp_created_script_setup .bat

Windows Mobile 6 Professional selected, environment is set up

这可能是我的问题,就好像我输入了 checksdk -list我得到这个输出

Available SDKs:
SDK Name: Pocket PC 2003 (ARMV4)
SDK Name: Smartphone 2003 (ARMV4)

出于某种原因,未检测到 Windows Mobile Professional 6.5 SDK,即使我可以从 Visual Studio 2008 创建、构建和运行 Windows Mobile Professional 6.5 应用程序。

然而,setcepaths命令应该设置一些环境变量来覆盖默认的 Visual Studio 包含路径并包含它们的 Windows Mobile 对应路径,所以我继续按照指南将它们设置为

set INCLUDE=C:\Program Files\Microsoft Visual Studio 9.0\VC\ce\include;C:\Program Files\Windows Mobile 6 SDK\PocketPC\Include\Armv4i
set LIB=C:\Program Files\Microsoft Visual Studio 9.0\VC\ce\lib\armv4i;C:\Program Files\Windows Mobile 6 SDK\PocketPC\Lib\Armv4i
set PATH=C:\Program Files\Microsoft Visual Studio 9.0\VC\ce\bin\x86_arm;%PATH%

有了它,我尝试运行 nmake然后我被这个错误震惊了

C:\Qt\qt-everywhere-opensource-src-4.6.3>nmake

Microsoft (R) Program Maintenance Utility Version 9.00.30729.01
Copyright (C) Microsoft Corporation. All rights reserved.

cd src\winmain\ && "C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\
nmake.exe" -f Makefile

Microsoft (R) Program Maintenance Utility Version 9.00.30729.01
Copyright (C) Microsoft Corporation. All rights reserved.

"C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\nmake.exe" -f Makef
ile.Debug all

Microsoft (R) Program Maintenance Utility Version 9.00.30729.01
Copyright (C) Microsoft Corporation. All rights reserved.

lib /SUBSYSTEM:WINDOWSCE,5.02 /MACHINE:THUMB /OUT:..\..\lib\qtmaind.lib
@C:\Users\AHMED~1.SAB\AppData\Local\Temp\nm6312.tmp
Microsoft (R) Library Manager Version 9.00.21022.08
Copyright (C) Microsoft Corporation. All rights reserved.

tmp\obj\debug_shared\qtmain_win.obj
tmp\obj\debug_shared\qtmain_win.obj : fatal error LNK1112: module machine type '
X86' conflicts with target machine type 'THUMB'
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 9.0\VC\ce\
bin\x86_arm\lib.EXE"' : return code '0x458'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN
\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.

最佳答案

  1. 下载并安装 Qt SDK for Open Source C++ for Windows http://qt.nokia.com/downloads/sdk-windows-cpp
  2. 安装 Visual Studio。
  3. 安装 Visual Studio SP1。
  4. 安装 .Net Compact Framework。
  5. 如果操作系统是 XP 或更早版本,请安装 Microsoft Active Sync。
  6. 如果操作系统是 Vista 或更高版本,请安装 Windows Mobile Device Center。
  7. 安装 Windows Mobile 6 SDK。
  8. 下载并解压缩 Qt C++ WinCE SDK(例如 C:\Qt\QtWinCE)。
  9. 下载并安装适用于 Visual Studio 的 Qt C++ Windows(例如 C:\Qt\QtVS2008)。
  10. 在 Qt WinCE 文件夹和 Qt C++ Windows for Visual Studio 文件夹中安装 Qt Visual Studio 插件。
  11. 更改系统环境变量:
    • 设置 INCLUDE=C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\ce\include;C:\Program Files (x86)\Windows Mobile 6 SDK\PocketPC\Include\Armv4i;
    • 设置 LIB=C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\ce\lib\armv4i;C:\Program Files (x86)\Windows Mobile 6 SDK\PocketPC\Lib\Armv4i;<
    • 设置QTDIR=C:\Qt\QtWinCE;C:\Qt\QtVS2008;C:\Qt\2010.02.1;C:\Qt\2010.02.1\qt;
    • 设置 PATH=C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\ce\bin\x86_arm;%PATH%;
  12. 配置。
  13. setcepaths wincewm60professional-msvc2008
  14. nmake

关于c++ - 如何在Windows下编译Qt 4.6.3 for Windows Mobile (Windows CE)?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3334339/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com