2012-04-07 75 views
0

是否有可能使用embeddedVisualC++ 4.0而不是MSVC 2005编译Qt for WindowsCE 5.0?我按照official tutorial的方法尝试了,但无法启动。如何使用embeddedVisualC++ 4.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. 

回答

0

您可以验证您已安装的eVC Service Pack 4?这增加了对Windows CE 5.0的支持。

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

另外请确保您没有禁用language extensions。尝试添加-Ze到您的编译器标记

-PaulH

+0

是的,安装了SP4,我可以编译“Hello World”。也许Qt的makefile的默认编译器设置不适合eVC编译器? – ftl 2012-04-09 06:36:59