• 11392阅读
  • 13回复

求助:***************QT WINCE 布署问题************************** [复制链接]

上一主题 下一主题
离线dotle
 
只看楼主 倒序阅读 楼主  发表于: 2008-09-19
— 本帖被 XChinux 执行加亮操作(2008-09-20) —
参照《Qt-WinCE安装、开发及部署全解 》进行了wince环境下的配置。
编译应用程序也能通过,但是放到板子上提示"不是有效的WINDOWS CE应用程序",

编译过程如下:
//配置:
configure -platform win32-msvc2005 -xplatform wince50standard-armv4i-msvc2005
//设置路径:
set INCLUDE=C:\Program Files\Microsoft Visual Studio 8\VC\ce\include;D:\Program Files\Windows CE Tools\wce500\CE50CHS\Include\Armv4i
set LIB=C:\Program Files\Microsoft Visual Studio 8\VC\ce\lib\armv4i;D:\Program Files\Windows CE Tools\wce500\CE50CHS\Lib\ARMV4I
set PATH=C:\Program Files\Microsoft Visual Studio 8\VC\ce\bin\x86_arm;%PATH%

//编译qt-embedded-wince-opensource-src-4.4.1
nmake

//应用程序编译过程如下:
//在命令行下:
F:\qt441CE\bin\qmake -spec F:\qt4.4.1\qt\mkspecs\wince50standard-armv4i-msvc2005 -win32 -o Makefile textedit.pro
//设置路径
set INCLUDE=C:\Program Files\Microsoft Visual Studio 8\VC\ce\include;D:\Program Files\Windows CE Tools\wce500\CE50CHS\Include\Armv4i
set LIB=C:\Program Files\Microsoft Visual Studio 8\VC\ce\lib\armv4i;D:\Program Files\Windows CE Tools\wce500\CE50CHS\Lib\ARMV4I
set PATH=C:\Program Files\Microsoft Visual Studio 8\VC\ce\bin\x86_arm;%PATH%
//编译应用程序
nmake release

////////////////////////////////////////////////////////////////////////////
整个过程中没有错误报出,但是板子上运行提示"不是有效的WINDOWS CE应用程序",目标板使用的是arm2440+wince5.0,
看过很多文章,说是platform的问题,但我仔细看过我的配置过程,没发现问题。。
各位老大帮我支个招。

中间也试过很多的方法,在VS2005下选择-》CE50CHS模拟器-CPU选择win32(wce emulator)release编译,可以在模拟器下运行。
离线jackin0627
只看该作者 1楼 发表于: 2009-01-07
老大,我和你的情况一样呀,我的是三星的开发板,CPU是S3C2440A,Windows CE 5.0,
有没有人知道怎么解决呀
离线dotle
只看该作者 2楼 发表于: 2009-01-08
定制sdk的话有如下工作要做:
在QT安装目录的\mkspecs下新建一个目录“wince50armsys2440-armv4i-msvc2005”命名必须符合如下规则wince<version><SDK-shortcut>-[architecture]-msvc2005。
将wince50standard-armv4i-msvc2005目录下的qmake.conf和qplatformdefs.h拷入新建目录。
修改qmake.conf,将CE_SDK        = STANDARDSDK_500修改为:CE_SDK        = armsys2440并保存
其中armsys2440是你板子的sdk的名字。

编译中前 configure时mkspecs修改如下:
configure -platform win32-msvc2005 -xplatform wince50armsys2440-armv4i-msvc2005

然后配置临时环境变量,随vs2005和SDK的安装目录不同而不同。
编译即可
离线蛮蛮
只看该作者 3楼 发表于: 2009-01-08
真厉害。我也想试着看看咋样。不过咱的安装过程中严格按Qt Assistant来的,但在nmake时它就是会让我的机子出蓝屏,试了再次了。
蛮蛮工作室
离线jackin0627
只看该作者 4楼 发表于: 2009-01-08
我的SDK是STANDARDSDK_500,我是不是直接用wince50standard-armv4i-msvc2005 呢,可是我编出来的EXE在扳子上不能跑,错是 “XXX" is not a valid windows ce application
我安装的命令如下:
configure -platform win32-msvc2005 -xplatform wince50standard-armv4i-msvc2005

set INCLUDE=C:\Program Files\Microsoft Visual Studio 8\VC\ce\include;C:\Program Files\Windows CE Tools\wce500\STANDARDSDK_500\Include\Armv4i
set LIB=C:\Program Files\Microsoft Visual Studio 8\VC\ce\lib\armv4i;C:\Program Files\Windows CE Tools\wce500\STANDARDSDK_500\Lib\ARMV4I
set PATH=C:\Program Files\Microsoft Visual Studio 8\VC\ce\bin\x86_arm;%PATH%

where cl
C:\Program Files\Microsoft Visual Studio 8\VC\ce\bin\x86_arm\cl.exe
C:\Program Files\Microsoft Visual Studio 8\VC\bin\cl.exe

nmake
离线dotle
只看该作者 5楼 发表于: 2009-01-08
STANDARDSDK_500这个是标准SDK 。不是你板子的的sdk吧。
STANDARDSDK_500在我只能做模拟器用。用他来编译qt库,我也得到过你那样的结果。
离线jackin0627
只看该作者 6楼 发表于: 2009-01-08
在我运行 configure -platform win32-msvc2005 -xplatform wince50standard-armv4i-msvc2005 时有如下的错误:

readdir() attempted on invalid dirhandle DIR at D:\qt443ce\bin/syncqt line 724.
closedir() attempted on invalid dirhandle DIR at D:\qt443ce\bin/syncqt line 728.

readdir() attempted on invalid dirhandle DIR at D:\qt443ce\bin/syncqt line 724.
closedir() attempted on invalid dirhandle DIR at D:\qt443ce\bin/syncqt line 728.

readdir() attempted on invalid dirhandle DIR at D:\qt443ce\bin/syncqt line 724.
closedir() attempted on invalid dirhandle DIR at D:\qt443ce\bin/syncqt line 728.

不过并没有退出,下面的操作还能正常进行,是不是由这个引起的呢,该怎么解决呢?
离线jackin0627
只看该作者 7楼 发表于: 2009-01-08
引用第5楼dotle于2009-01-08 13:58发表的  :
STANDARDSDK_500这个是标准SDK 。不是你板子的的sdk吧。
STANDARDSDK_500在我只能做模拟器用。用他来编译qt库,我也得到过你那样的结果。


我用STANDARDSDK_500开发的测试程序(非QT)可以在我板子上运行呀。
离线dotle
只看该作者 8楼 发表于: 2009-01-08
我也用STANDARDSDK_500编译过qt库,结果和你的一样。
是看了下面这段文章才明白
Windows CE - Working with Custom SDKs

When working with a custom SDK for Windows CE, Qt provides an easy way to add support for it to your development environment. The following is a tutorial that covers how to create a specification for Qt on Windows CE platforms.

Creating a Custom Build Specification
Fine-Tuning Options
Creating a Custom Build Specification

Create a subdirectory in the mkspecs folder of the Qt directory. New specifications for Qt/Windows CE following this naming convention:

    wince<version><SDK-shortcut>-[architecture]-msvc2005
Using this convention makes it possible for qmake to identify that you are building Qt for Windows CE, and will customize the compilation process accordingly.

Create the files qmake.conf and qplatformdefs.h inside the new specification directory. Take a look at the implementation of the other Windows CE specifications included in the mkspecs directory to see what is required to build Qt/Windows CE successfully.

Fine-Tuning Options

Compared to the desktop versions, Qt/Windows CE needs two additional options:

CE_SDK specifies the name of the SDK.
CE_ARCH specifies information about the target architecture.
Following is an example configuration for the Windows Mobile 5 for Pocket PC SDK:

    CE_SDK        = Windows Mobile 5.0 Pocket PC SDK
    CE_ARCH      = ARMV4I
Note: qmake uses this information to build a valid Visual Studio project file. You need to ensure that they are identical to the configuration of the custom SDK, otherwise you might not be able to compile or debug your project with Visual Studio.

Additionally, most Windows CE SDKs use extra compiler options. These can be specified by expanding the DEFINES value.

For example, with Windows Mobile 5 for Pocket PC, the DEFINES variable is expanded in the following way:

    DEFINES          += UNDER_CE WINCE _WINDOWS _UNICODE UNICODE _WIN32_WCE=0x501 $$CE_ARCH _ARMV4I_ armv4i _ARM_ ARM _M_ARM ARM _WIN32 __arm__ Q_OS_WINCE_WM QT_NO_PRINTER QT_NO_PRINTDIALOG
离线dotle
只看该作者 9楼 发表于: 2009-01-08
所以一定要用你板子所对应的sdk编译库文件,
在你的PB里 platform->sdk->build sdk
对应你板子生成的那个进行安装
离线jackin0627
只看该作者 10楼 发表于: 2009-01-08
多谢老大指点,
我没有和板子相对应的SDK,板子的光盘里有一个PB可以按上,我怎样才能自己做个SDK?
多谢了。
离线jackin0627
只看该作者 11楼 发表于: 2009-01-09
我用PB生成了一个SDK,终于成功了,多谢老大帮忙
离线omadesala
只看该作者 12楼 发表于: 2009-02-05
4.4.3 能否支持wince6.0呢,我修改过后,configure 在指定 -xplatform 时,选择了自己定义的SDK,configure 失败,打印help 信息,不知道是什么问题呢?那位大人给个解释,谢谢
离线dotle
只看该作者 13楼 发表于: 2009-03-06
回楼上,没试过,不过按照官方说法是支持的。要看你失败提示的是什么。
快速回复
限100 字节
 
上一个 下一个