December 17, 2011

ibingow ibingow
Lab Rat
29 posts

build qt4.8.0 for wince failed

Page  
1

with the same steps, i build qt4.7.4 successfully but 4.8.0 failed.

error message:

  1.  cd src\winmain\ && "e:\Microsoft Visual Studio 9.0\VC\bin\nmake.exe" -f Makefile
  2.  "e:\Microsoft Visual Studio 9.0\VC\bin\nmake.exe" -f Makefile.Release
  3.  cd src\corelib\ && "e:\Microsoft Visual Studio 9.0\VC\bin\nmake.exe" -f Makefile
  4.  "e:\Microsoft Visual Studio 9.0\VC\bin\nmake.exe" -f Makefile.Release
  5.  cl -c -FIqt_pch.h -Yuqt_pch.h -Fptmp\obj\release_shared\QtCore_pch.pch -nologo -Zm200 -Zc:wchar_t- -O2 -MD -W3 -w34100 -w34189 -EHs-c- -EHsc -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:\Qt\qt-everywhere-opensource-src-4.8.0\src\3rdparty\zlib" -I"d:\Qt\qt-everywhere-opensource-src-4.8.0\src\3rdparty\harfbuzz\src" -I"d:\Qt\qt-everywhere-opensource-src-4.8.0\src\3rdparty\md5" -I"d:\Qt\qt-everywhere-opensource-src-4.8.0\src\3rdparty\md4" -I"..\..\include\ActiveQt" -I"tmp\moc\release_shared" -I"d:\Qt\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\nmF52E.tmp
  6. qlocale_tools.cpp
  7. d:\Qt\qt-everywhere-opensource-src-4.8.0\src\corelib\tools\qlocale_tools.cpp(2273) : error C3861: '_control87': identifier not found
  8. d:\Qt\qt-everywhere-opensource-src-4.8.0\src\corelib\tools\qlocale_tools.cpp(2281) : error C3861: '_control87': identifier not found
  9. d:\Qt\qt-everywhere-opensource-src-4.8.0\src\corelib\tools\qlocale_tools.cpp(2294) : error C3861: '_control87': identifier not found

I read the source code, _control87 is defined as another function for wince, but it’s strange that in this file it is not, i don’t know how to fix it.

16 replies

December 17, 2011

Flavio Portela Flavio Portela
Ant Farmer
69 posts

Hello,
I am having the same problem, I compiled in the same way that Qt4.7.4 and VS2005.
In the links:
http://developer.qt.nokia.com/doc/qt-4.7/install-wince.html
and
http://developer.qt.nokia.com/doc/qt-4.8/install-wince.html
they didn’t increase anything again and it continues giving the same mistake

error message:

cl -c -FIqt_pch.h -Yuqt_pch.h -Fptmp\obj\debug_static\QtCored_pch.pch -n ologo 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 -D_WIN32_WCE=0×501 -DARMV4I -D_ARMV4I_ -Darm v4i -D_ARM_ -DARM -D_M_ARM -DARM -D__arm__ -DQ_OS_WINCE_WM -DQT_NO_PRINTER -DQT_ NO_PRINTDIALOG -DQT_BUILD_CORE_LIB -DQT_NO_USING_NAMESPACE -DQT_ASCII_CAST_WARNI NGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -D_USE_MATH_DEFINES -DNO_ERRNO_H -DH B_EXPORT=Q_CORE_EXPORT -DQT_HAVE_MMX -DQT_HAVE_IWMMXT -DQT_NO_DYNAMIC_CAST -I”.. \..\include” -I”..\..\include\QtCore” -I“tmp\rcc\debug_static” -I“tmp” -I“global “ -I”..\3rdparty\zlib” -I”..\3rdparty\harfbuzz\src” -I”..\3rdparty\md5” -I”..\3r dparty\md4” -I”..\..\include\ActiveQt” -I“tmp\moc\debug_static” -I”..\..\mkspecs \wincewm50pocket-msvc2005” -Fotmp\obj\debug_static\ @C:\DOCUME~1\ADMINI~1\CONFIG ~1\Temp\nm40.tmp qlocale_tools.cpp tools\qlocale_tools.cpp(2273) : error C3861: ‘_control87’: identifier not found tools\qlocale_tools.cpp(2281) : error C3861: ‘_control87’: identifier not found tools\qlocale_tools.cpp(2294) : error C3861: ‘_control87’: identifier not found NMAKE : fatal error U1077: ‘“C:\Arquivos de programas\Microsoft Visual Studio 8\ VC\ce\bin\x86_arm\cl.EXE”’ : return code ‘0×2’ Stop. NMAKE : fatal error U1077: ‘“C:\Arquivos de programas\Microsoft Visual Studio 8\ VC\bin\nmake.exe”’ : return code ‘0×2’ Stop. NMAKE : fatal error U1077: ‘cd’ : return code ‘0×2’ Stop.
 Signature 

Flavio Portela

December 20, 2011

ephe ephe
Lab Rat
102 posts

Are you using VS2005 or VS2008? I had some problems when using VS2005, but it worked with VS2008. But I cannot remember if it was the same problem.

December 21, 2011

ibingow ibingow
Lab Rat
29 posts

I use vs2008

saho wrote:
Are you using VS2005 or VS2008? I had some problems when using VS2005, but it worked with VS2008. But I cannot remember if it was the same problem.

December 21, 2011

ephe ephe
Lab Rat
102 posts

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)?

  1. // The standard SDK misses this define...
  2. #define _control87 _controlfp

and in the qlocale_tools.cpp I there is this include:

  1. #include "qfunctions_wince.h"

I hope that I could help with that.

December 21, 2011

ibingow ibingow
Lab Rat
29 posts

yes, i have. The problem is Q_OS_WINCE is not defined in qlocale_tools.cpp

saho wrote:
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)?

  1. // The standard SDK misses this define...
  2. #define _control87 _controlfp

and in the qlocale_tools.cpp I there is this include:

  1. #include "qfunctions_wince.h"

I hope that I could help with that.

December 21, 2011

ephe ephe
Lab Rat
102 posts

Were the Preprocessor Definitions set correctly?
_WIN32_WCE=0×700 (or 0×600 for Win CE 6) has to be set.

In the mkspecs in the qmake.conf of my platform I’ve got
DEFINES += WIN32_WCE=0×700 $$CE_ARCH _ARMV4I armv4i ARM ARM _M_ARM ARM arm Q_OS_WINCE_STD QT_NO_PRINTER QT_NO_PRINTDIALOG

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

December 21, 2011

ibingow ibingow
Lab Rat
29 posts

yes, the definitions are correct. when compiling other files, Q_OS_WINCE in qfunctions_wince.h is defined.

saho wrote:
Were the Preprocessor Definitions set correctly?
_WIN32_WCE=0×700 (or 0×600 for Win CE 6) has to be set.

In the mkspecs in the qmake.conf of my platform I’ve got
DEFINES += WIN32_WCE=0×700 $$CE_ARCH _ARMV4I armv4i ARM ARM _M_ARM ARM arm Q_OS_WINCE_STD QT_NO_PRINTER QT_NO_PRINTDIALOG

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

December 28, 2011

william william
Lab Rat
13 posts

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.

December 29, 2011

ibingow ibingow
Lab Rat
29 posts

william wrote:
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.

Thanks, it works. But i have another problem when builing zlib

  1.  cd src\winmain\ && "e:\Microsoft Visual Studio 9.0\VC\bin\nmake.exe" -f Makefile
  2.  "e:\Microsoft Visual Studio 9.0\VC\bin\nmake.exe" -f Makefile.Release
  3.  cd src\corelib\ && "e:\Microsoft Visual Studio 9.0\VC\bin\nmake.exe" -f Makefile
  4.  "e:\Microsoft Visual Studio 9.0\VC\bin\nmake.exe" -f Makefile.Release
  5.  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
  6. gzclose.c
  7. 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
  8. gzlib.c
  9. 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
  10. gzread.c
  11. 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
  12. gzwrite.c
  13. 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
  14. Generating Code...

December 31, 2011

william william
Lab Rat
13 posts

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.

January 4, 2012

fonzi337 fonzi337
Lab Rat
41 posts

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 ‘0×2’
Stop.
NMAKE : fatal error U1077: ‘“C:\Program Files\Microsoft Visual Studio 8\VC\bin\n
make.exe”’ : return code ‘0×2’
Stop.
NMAKE : fatal error U1077: ‘cd’ : return code ‘0×2’
Stop.

Any thoughts?

Update: For those who encounter a similar problem, I replaced line 553 in qfsfileengine_win.cpp

  1. return QFileSystemEngine::currentPath();

with

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

January 5, 2012

ncsunickv ncsunickv
Lab Rat
5 posts

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.

January 6, 2012

william william
Lab Rat
13 posts

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.

January 6, 2012

ncsunickv ncsunickv
Lab Rat
5 posts

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

February 9, 2012

alxvb alxvb
Lab Rat
1 posts

I’ve succeeded in building qt 4.8 for wince with the following pre-steps with sources

1. replace 3rdparty\zlib and 3rdparty\zlib.pri with same from qt 4.7.3 sources
2. in corelib\tools\qlocale_tools.cpp ad the following line

  1. #include <private/qfunctions_p.h>

3. in corelib\io\qfsfileengine_win.cpp change line 553

Fom:

  1.     return QFileSystemEngine::currentPath();

To:

  1.     return QFileSystemEngine::currentPath().filePath();

4. in corelib\kernel\qsystemerror.cpp change code from line 44

From:

  1. #if !defined(Q_OS_WINCE)
  2. #  include <errno.h>
  3. #  if defined(Q_CC_MSVC)
  4. #    include <crtdbg.h>
  5. #  endif
  6. #endif

To:

  1. #if defined(Q_OS_WINCE)
  2. #define strerror(n) "system error"
  3. #elif
  4. #  include <errno.h>
  5. #  if defined(Q_CC_MSVC)
  6. #    include <crtdbg.h>
  7. #  endif
  8. #endif

Then built it in usual way as a static lib with the following configuration:

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

Page  
1

  ‹‹ linux board shut down and standby mode frm QT      How to communicate with modem inside the phone? ››

You must log in to post a reply. Not a member yet? Register here!