How to compile Qt with embeddedVisualC++ 4.0?

585 Views Asked by At

Is it possible to compile Qt for WindowsCE 5.0 using embeddedVisualC++ 4.0 instead of MSVC 2005? I tried by following the official tutorial but couldn't get it to work.

The 'configure' script runs without errors, but when calling nmake to actually build the libraries, I get the following errors:

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.
1

There are 1 best solutions below

1
On

Can you verify you have Service Pack 4 installed for eVC? That adds support for Windows CE 5.0.

Next, try creating a project using the eVC wizard of the same type as your QT project that targets the Windows CE 5.0 SDK. Copy the compiler and linker settings from that wizard-created project to your QT project.

Also make sure you don't have language extensions disabled. Try adding -Ze to your compiler flags

-PaulH