Qt World Summit: Submit your Presentation

Cross Compile QT 5.5 on WinCE 6.0 / 6.5 (Windows Embedded Handheld 6.5 Classic)

  • Hi there,
    I'm trying to install/build Qt 5.5 for WinCE (ARM) with Windows Mobile 6 (and later on 6.5) Professional SDK/DTK but i ran into Problems while building the stuff. I really googled a lot but i can't figure out what i am doing wrong
    What did i do so far:

    1. installed Qt/Qt Creator for Windows
    2. Installed Visual Studio 2008 Professional
    3. Installed Windows Mobile 6 Professional SDK
    4. Installed Qt Visual Studio AddIn
    5. Downloaded Qt 5.5 everywhere source code
    6. tried to build Qt with following documentation: http://doc.qt.io/qt-5/install-wince.html

    I managed to configure without any Errors,

    configure -platform win32-msvc2008 -xplatform winmobile6Pro -nomake tests

    mkspec qmake:

    CE_SDK                  = Windows Mobile 6 Professional SDK
    CE_ARCH                 = ARMV4I
    DEFINES                += STANDARDSHELL_UI_MODEL _WIN32_WCE=0x600 $$CE_ARCH _ARMV4I_ armv4i _ARM_ ARM _M_ARM ARM _WIN32 __arm__
    QMAKE_LIBS              = corelibc.lib coredll.lib
    QMAKE_LIBS_CORE         = libcmt.lib corelibc.lib ole32.lib oleaut32.lib uuid.lib commctrl.lib coredll.lib winsock.lib
    QMAKE_LIBS_GUI          = ceshell.lib ole32.lib $$QMAKE_LIBS_CORE
    QMAKE_RC                = rc /DUNDER_CE=600 /D_WIN32_WCE=0x600

    but the nmake afterwards throws following error after successfuly compiling a lot of files:

    1.error: Second C linkage of overloaded function 'wcsftime' not allowed
    2.error: memcpy_s: identifier not found

    I tried to compile Qt 5.4. There is the same Problem.
    i even tried to compile Qt 5.2 and 5.3, but they have some errors when configuring them (some extra '/' in some path vars will break the whole configure process, there seems to be a proble in the config itself)

    Is anybody out there who can give me some info about my problem?
    best regards

  • It would be handy to provide the full log or at lease the module which fails to build. It could be that you manually need to do some code fixing as I needed to do for for WEC2013 (https://guruce.com/blogpost/wec2013-and-qt).

    I did not find any reference of "wcsftime" in the QT tree so perhaps there is something wrong in the mobile6 SDK?

  • Oh yes sorry, i should have provided more info about the error. Thank you for your answer!
    I guess maybe i have a problem setting up the correct path for the compiler or some other vars i think.
    I have to use the "vcvars.bat" from visual Studio 2008 because visual Studio 2013 does know nothing about the Windows CE 6.0 or 6.5 sdk.
    i do set the path to the sdk for e.g. 6.0 with this ones:

    set INCLUDE=C:\Programme\Microsoft Visual Studio 9.0\VC\ce\include;C:\SDK\WindowsMobile6Pro\PocketPC\Include\Armv4i; 
    set LIB=C:\Programme\Microsoft Visual Studio 9.0\VC\ce\lib\armv4i;C:\SDK\WindowsMobile6Pro\PocketPC\Lib\Armv4i;
    set PATH=C:\Programme\Microsoft Visual Studio 9.0\VC\ce\bin\x86_arm;%PATH% 
    "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\vcvarsall.bat"

    after those commands i do make the configure and the nmake where the nmake results inf following error

    Microsoft (R) Program Maintenance Utility Version 9.00.30729.01
    Copyright (C) Microsoft Corporation.  All rights reserved.
            cl -c -Yc -Fp.pch\debug\Qt5Cored_pch.pch -Fo.pch\debug\Qt5Cored_pch.obj
    -nologo -Zm200 -Zc:wchar_t- -DDEBUG -D_DEBUG -Zi -MDd -EHsc -GR -W3 -w34100 -w34
    189 /Fd..\..\lib\Qt5Cored.pdb -DUNDER_CE -DWINCE -D_WINDOWS -D_UNICODE -DUNICODE
    WCE=0x600 -DARMV4I -D_ARMV4I_ -Darmv4i -D_ARM_ -DARM -D_M_ARM -DARM -D_WIN32 -D_
    800 -DNO_ERRNO_H -DPCRE_STATIC -DQT_NO_ICONV -DQT_CORE_LIB -I. -I..\3rdparty\zli
    b -I..\..\include -I..\..\include\QtCore -I..\..\include\QtCore\5.5.1 -I..\..\in
    clude\QtCore\5.5.1\QtCore -Itmp -Iglobal -I..\3rdparty\pcre -I..\3rdparty\harfbu
    zz\src -I..\3rdparty\md5 -I..\3rdparty\md4 -I..\3rdparty\sha3 -I.moc\debug -I..\
    ..\mkspecs\winmobile65Std -TP global\qt_pch.h
    C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\ce\include\altcecrt.h(363): error C2733: second C linkage of overloaded function 'wcsftime' not allowed
    C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\ce\include\altcecrt.h(363) : see declaration of 'wcsftime'
    C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\ce\include\altcecrt.h(391): error C3861: 'memcpy_s': identifier not found
    C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\ce\include\altcecrt.h(396): error C3861: 'memmove_s': identifier not found
    C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\ce\include\iosfwd(584) : error C2039: 'memcpy_s' : is not a member of '`global namespace''
    C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\ce\include\iosfwd(584) : error C3861: 'memcpy_s': identifier not found
    C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\ce\include\iosfwd(608) : error C2039: 'memmove_s' : is not a member of '`global namespace''
    C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\ce\include\iosfwd(608) : error C3861: 'memmove_s': identifier not found
    NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\\ce\bin\x86_arm\cl.EXE"' : return code '0x2'
    NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\nmake.exe"' : return code '0x2'
    NMAKE : fatal error U1077: 'cd' : return code '0x2'

    So it seems that the CE x86_arm Compiler is a Little bit outdated ore something like that...

    BTW: I looked at your link and this is very interessting and informative!

  • I spinned my old WINCE6 vm and try to build QT against an SDK but It did not found my SDK at all. I will try later on if I can reproduce you're issue. I do suspect the SDK though.

  • I tried to build on another windows machine (Windows 8.1 instead windows 7). i used the same steps as i used before.
    There the build stops with the error that the system cant find "GLES2/gl2.h" which is related to the openGL part of Qt
    I do not know if this build attempt went further than the one on the windows 7 machine with the "memcpy_s" error.

    Anyway i'll try to solve the gl2.h error on the Windows 8.1 machine... Problem is that the configure comes up with the warning that "angle is no longer supported for this compiler" and Qt doesnt find any DirectX-SDK... So.... I'm getting into trouble now i think...

    I mean there is the option for CWindows CE

    You can run configure with the -opengl-es-cm option for the Common profile. Ensure that the lib and includes paths include the OpenGL ES headers and libararies from your SDK. The OpenGL ES lib should be called either libGLES_CM.lib for the Common profile.

    But neither the the Windows CE 6.0 or Windows CE 6.5 Professional SDK does have the libGLES_CM.lib
    Furthermore the "-opengl-es-ce" parameter is not recognized by configure

    The Windows CE SDK do have the D3D libs... so i don't know why they are not found by the configure stuff...

  • Hi! I am trying to compile Qt 5.x for Windows Mobile 6.5, and getting a lot of errors about wcsftime and other functions told above. How did you solve that problems?