Build qt4.8.0 for wince failed
-
I just had a look at this file in my build.
Do you have this line in \src\corelib\kernel\qfunctions_wince.h (it's right underneath the QT_END_HEADER)?
@// The standard SDK misses this define...
#define _control87 _controlfp@and in the qlocale_tools.cpp I there is this include:
@#include "qfunctions_wince.h"@I hope that I could help with that.
-
yes, i have. The problem is Q_OS_WINCE is not defined in qlocale_tools.cpp
[quote author="saho" date="1324457534"]I just had a look at this file in my build.Do you have this line in \src\corelib\kernel\qfunctions_wince.h (it's right underneath the QT_END_HEADER)?
@// The standard SDK misses this define...
#define _control87 _controlfp@and in the qlocale_tools.cpp I there is this include:
@#include "qfunctions_wince.h"@I hope that I could help with that.[/quote]
-
Were the Preprocessor Definitions set correctly?
_WIN32_WCE=0x700 (or 0x600 for Win CE 6) has to be set.In the mkspecs in the qmake.conf of my platform I've got
DEFINES += _WIN32_WCE=0x700 $$CE_ARCH ARMV4I armv4i ARM ARM _M_ARM ARM arm Q_OS_WINCE_STD QT_NO_PRINTER QT_NO_PRINTDIALOGIt is strange that this was working for 4.7 but not anymore for 4.8. I'm sure that you have also cross-compiled it with configure -platform win32-msvc2005 -xplatform wincewm50pocket-msvc2005
For me, 4.7 was not working correctly, but building 4.8 with VS2008 under Windows 7 was working fine.
-
yes, the definitions are correct. when compiling other files, Q_OS_WINCE in qfunctions_wince.h is defined.
[quote author="saho" date="1324459365"]Were the Preprocessor Definitions set correctly?
_WIN32_WCE=0x700 (or 0x600 for Win CE 6) has to be set.In the mkspecs in the qmake.conf of my platform I've got
DEFINES += _WIN32_WCE=0x700 $$CE_ARCH ARMV4I armv4i ARM ARM _M_ARM ARM arm Q_OS_WINCE_STD QT_NO_PRINTER QT_NO_PRINTDIALOGIt is strange that this was working for 4.7 but not anymore for 4.8. I'm sure that you have also cross-compiled it with configure -platform win32-msvc2005 -xplatform wincewm50pocket-msvc2005
For me, 4.7 was not working correctly, but building 4.8 with VS2008 under Windows 7 was working fine.
[/quote] -
Add below line to qlocale_tools.cpp would be OK.
#include <private/qfunctions_p.h>I'm using VS2005 and have compiled corelib, gui and xml successfully after make some changes.
-
[quote author="william" date="1325035622"]Add below line to qlocale_tools.cpp would be OK.
#include <private/qfunctions_p.h>I'm using VS2005 and have compiled corelib, gui and xml successfully after make some changes.[/quote]
Thanks, it works. But i have another problem when builing zlib
@ cd src\winmain\ && "e:\Microsoft Visual Studio 9.0\VC\bin\nmake.exe" -f Makefile
"e:\Microsoft Visual Studio 9.0\VC\bin\nmake.exe" -f Makefile.Release
cd src\corelib\ && "e:\Microsoft Visual Studio 9.0\VC\bin\nmake.exe" -f Makefile
"e:\Microsoft Visual Studio 9.0\VC\bin\nmake.exe" -f Makefile.Release
cl -c -nologo -Zm200 -Zc:wchar_t- -QRarch4T -QRinterwork-return -O2 -MD -W3 -DQT_SHARED -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_BUILD_CORE_LIB -DQT_NO_USING_NAMESPACE -DQT_MAKEDLL -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -D_USE_MATH_DEFINES -DNO_ERRNO_H -DHB_EXPORT=Q_CORE_EXPORT -DQT_DLL -DQT_NO_DEBUG -DQT_NO_DYNAMIC_CAST -I"....\include" -I"....\include\QtCore" -I"tmp\rcc\release_shared" -I"tmp" -I"global" -I"d:\build\qt-everywhere-opensource-src-4.8.0\src\3rdparty\zlib" -I"d:\build\qt-everywhere-opensource-src-4.8.0\src\3rdparty\harfbuzz\src" -I"d:\build\qt-everywhere-opensource-src-4.8.0\src\3rdparty\md5" -I"d:\build\qt-everywhere-opensource-src-4.8.0\src\3rdparty\md4" -I"....\include\ActiveQt" -I"tmp\moc\release_shared" -I"d:\build\qt-everywhere-opensource-src-4.8.0\src\corelib" -I"." -I"....\mkspecs\wince50standard-armv4i-msvc2008" -Fotmp\obj\release_shared\ @C:\Users\ADMINI~1\AppData\Local\Temp\nmA8FC.tmp
gzclose.c
d:\build\qt-everywhere-opensource-src-4.8.0\src\3rdparty\zlib\gzguts.h(43) : fatal error C1083: Cannot open include file: 'io.h': No such file or directory
gzlib.c
d:\build\qt-everywhere-opensource-src-4.8.0\src\3rdparty\zlib\gzguts.h(43) : fatal error C1083: Cannot open include file: 'io.h': No such file or directory
gzread.c
d:\build\qt-everywhere-opensource-src-4.8.0\src\3rdparty\zlib\gzguts.h(43) : fatal error C1083: Cannot open include file: 'io.h': No such file or directory
gzwrite.c
d:\build\qt-everywhere-opensource-src-4.8.0\src\3rdparty\zlib\gzguts.h(43) : fatal error C1083: Cannot open include file: 'io.h': No such file or directory
Generating Code...@ -
You need to appoint an older version of zlib, 1.2.3 would be OK as it also used in Qt 4.7. In Qt 4.8.0, it contains a newer zlib 1.2.5 and use read/write function for file operation. These functions doesn't support in WinCE.
-
william, could you elaborate on how one goes about appointing an older version of zlib for the build? I tried copying the Qt 4.7.4 /3rdParty/zlib folder as well as the Qt 4.7.4 /3rdParty/zlib.pri and Qt 4.7.4 /3rdPart/zlib_dependency.pri files into my Qt 4.8.0's /3rdParty directory but this does not fix the issue.
Update: Sorry, I was encountering issues with zlib because I forgot to rerun configure after reverting zlib to version 1.2.3.
Were any of you able to successfully cross-compile Qt after reverting zlib to version 1.2.3? It now gets past the zlib error I was seeing before, but now has a problem doing a conversion in qfsfileengine_win.cpp:
c:\Qt\QtWinCE\4.8.0\src\corelib\io\qfsfileengine_win.cpp(553) : error C2664: 'QS
tring::QString(QChar)' : cannot convert parameter 1 from 'QFileSystemEntry' to '
QChar'
No user-defined-conversion operator available that can perform this conv
ersion, or the operator cannot be called
qfilesystemwatcher_win.cpp
qwindowspipewriter.cpp
qfilesystemengine_win.cpp
qfilesystemiterator_win.cpp
Generating Code...
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 8\VC\ce\bi
n\x86_arm\cl.EXE"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 8\VC\bin\n
make.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.Any thoughts?
Update: For those who encounter a similar problem, I replaced line 553 in qfsfileengine_win.cpp
@return QFileSystemEngine::currentPath();@
with
@return QFileSystemEngine::currentPath().filePath();@
I ran into other issues later on, but I suspect those may have been caused by my include paths not being properly set up.
-
Struggling through these build issues as well. From the 4.8.0 commercial release notes, appears all of these issues are resolved in the commercial build:
http://qt.digia.com/en/Qt/Release-Notes/Release-Notes-Qt-Commercial-48-Final/
Not familiar with any location to grab patches, if any exist, for the open source edition.
-
Seems that it would be fixed on next release.
@fonzi337, @ncsunickv
Please tell me your email address through my private email as there are several files need to be changed and I don't know how to put these files to the forum. -
Hi William,
Really appreciate your help with this. My email is ncsunickv at yahoo dot com (avoiding bots). I would also assume the next release will contain the build fixes, as I think the 4.7.0 also had some build issues that were corrected in 4.7.1.
Also, one thing I noticed is there appears to be a configuration option for leaving the zlib out of the build. I didn't try this though, just regressed back to the previous version. Thanks,
Nick
-
I’ve succeeded in building qt 4.8 for wince with the following pre-steps with sources
-
replace 3rdparty\zlib and 3rdparty\zlib.pri with same from qt 4.7.3 sources
-
in corelib\tools\qlocale_tools.cpp ad the following line
@#include <private/qfunctions_p.h>@ -
in corelib\io\qfsfileengine_win.cpp change line 553
Fom:
@ return QFileSystemEngine::currentPath();@To:
@ return QFileSystemEngine::currentPath().filePath();@- in corelib\kernel\qsystemerror.cpp change code from line 44
From:
@#if !defined(Q_OS_WINCE)include <errno.h>
if defined(Q_CC_MSVC)
include <crtdbg.h>
endif
#endif@
To:
@#if defined(Q_OS_WINCE)
#define strerror(n) "system error"
#elifinclude <errno.h>
if defined(Q_CC_MSVC)
include <crtdbg.h>
endif
#endif@
Then built it in usual way as a static lib with the following configuration:
@ configure.exe -platform win32-msvc2008 -xplatform wincewm60professional-msvc2008 -opensource -nomake examples -nomake demos -iwmmxt -no-exceptions -no-stl -no-rtti -no-qt3support -no-scripttools -no-style-motif -no-style-cde -no-style-cleanlooks -no-sql-sqlite -no-accessibility -no-dbus -no-phonon -no-phonon-backend -no-webkit -no-script -no-declarative -qt-libjpeg -qt-zlib -qt-libpng -L D:\QtSDK\opengl_wce\lib -openssl -I D:\QtSDK\openssl_wce\include -L D:\QtSDK\openssl_wce\lib -release -static@ -
-
Step 2, 3 and 4 are fixed in 4.8.1 open source. Step 1 is not.