0

是否可以使用 EmbeddedVisualC++ 4.0 而不是 MSVC 2005 为 WindowsCE 5.0 编译 Qt?我尝试按照官方教程进行操作,但无法正常工作。

“配置”脚本运行时没有错误,但是在调用 nmake 来实际构建库时,出现以下错误:

E:\QT\SDK\QtSources\4.8.0.ce>nmake

Microsoft (R) Program Maintenance Utility   Version 6.00.8168.0
Copyright (C) Microsoft Corp 1988-1998. All rights reserved.

        cd src\winmain\ && NMAKE -f Makefile

Microsoft (R) Program Maintenance Utility   Version 6.00.8168.0
Copyright (C) Microsoft Corp 1988-1998. All rights reserved.

        NMAKE -f Makefile.Debug all

Microsoft (R) Program Maintenance Utility   Version 6.00.8168.0
Copyright (C) Microsoft Corp 1988-1998. All rights reserved.

        cl -c -nologo -Zm200 -Zc:wchar_t- -DDEBUG -D_DEBUG -Zi -MDd -W3 -w34100 -w34189 -EHs-c- -DQT_THREAD_SUPPORT -DUNDER_CE -DWINCE -D_WINDOWS -D_UNICODE -DUNICODE -D_WIN32 -DQT_NO_PRINTER -DQT_NO_PRINTDIALOG -DSTANDARDSHELL_UI_MODEL -D_WIN32_WCE=0x500 -DARMV4I -D_ARMV4I_ -Darmv4i -D_ARM_ -DARM -D_M_ARM -DARM -D__arm__ -DQ_OS_WINCE_STD -DQT_NO_PRINTER -DQT_NO_PRINTDIALOG -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -D_USE_MATH_DEFINES -DQT_NO_DYNAMIC_CAST -I"..\..\include" -I"tmp" -I"..\..\include\QtCore" -I"e:\QT\SDK\QtSources\4.8.0.ce\include\qtmain" -I"tmp\rcc\debug_shared" -I"tmp" -I"..\..\include\ActiveQt" -I"tmp\moc\debug_shared" -I"e:\QT\SDK\QtSources\4.8.0\src\winmain" -I"." -I"e:\QT\SDK\QtSources\4.8.0\mkspecs\wince50standard-armv4i-msvc2005" -Fotmp\obj\debug_shared\ @C:\Users\XYZ\AppData\Local\Temp\nma02104.
Command line warning D4002 : ignoring unknown option '-Zc'
Command line warning D4002 : ignoring unknown option '-Z:'
Command line warning D4002 : ignoring unknown option '-Zw'
Command line warning D4002 : ignoring unknown option '-Zc'
Command line warning D4002 : ignoring unknown option '-Zh'
Command line warning D4002 : ignoring unknown option '-Zr'
Command line warning D4002 : ignoring unknown option '-Z_'
Command line warning D4002 : ignoring unknown option '-Zt'
Command line warning D4002 : ignoring unknown option '-Z-'
Command line warning D4002 : ignoring unknown option '-w34100'
Command line warning D4002 : ignoring unknown option '-w34189'
qtmain_win.cpp
E:\Microsoft SDKs\Windows CE Tools\wce500\STANDARDSDK_500\Include\ARMV4I\winnt.h(383) : error C2467: illegal declaration of anonymous 'struct'
E:\Microsoft SDKs\Windows CE Tools\wce500\STANDARDSDK_500\Include\ARMV4I\winnt.h(402) : error C2467: illegal declaration of anonymous 'struct'
E:\Microsoft SDKs\Windows CE Tools\wce500\STANDARDSDK_500\Include\ARMV4I\winnt.h(6040) : error C2467: illegal declaration of anonymous 'struct'
E:\Microsoft SDKs\Windows CE Tools\wce500\STANDARDSDK_500\Include\ARMV4I\winnt.h(6049) : error C2467: illegal declaration of anonymous 'struct'
E:\Microsoft SDKs\Windows CE Tools\wce500\STANDARDSDK_500\Include\ARMV4I\winnt.h(6746) : error C2133: 'pEventLogRecords' : unknown size
E:\Microsoft SDKs\Windows CE Tools\wce500\STANDARDSDK_500\Include\ARMV4I\winnt.h(6752) : error C2133: 'ulOffsets' : unknown size
E:\Microsoft SDKs\Windows CE Tools\wce500\STANDARDSDK_500\Include\ARMV4I\winbase.h(1130) : error C2467: illegal declaration of anonymous 'struct'
E:\Microsoft SDKs\Windows CE Tools\wce500\STANDARDSDK_500\Include\ARMV4I\kfuncs.h(109) : error C2144: syntax error : missing ';' before type 'void'
E:\Microsoft SDKs\Windows CE Tools\wce500\STANDARDSDK_500\Include\ARMV4I\kfuncs.h(109) : error C2501: '_inline' : missing storage-class or type specifiers
E:\Microsoft SDKs\Windows CE Tools\wce500\STANDARDSDK_500\Include\ARMV4I\kfuncs.h(109) : fatal error C1004: unexpected end of file found
NMAKE : fatal error U1077: 'cl' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"E:\Microsoft SDKs\Microsoft eMbedded C++ 4.0\COMMON\EVC\bin\NMAKE.EXE"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.
4

1 回答 1

1

您能否确认您已为 eVC 安装了Service Pack 4 ?这增加了对 Windows CE 5.0 的支持。

接下来,尝试使用与面向 Windows CE 5.0 SDK 的 QT 项目相同类型的 eVC 向导创建一个项目。将编译器和链接器设置从该向导创建的项目复制到您的 QT 项目。

还要确保您没有禁用语言扩展。尝试将 -Ze 添加到您的编译器标志中

-保罗H

于 2012-04-08T20:10:55.417 回答