Qt 5 Library Build for WEC7 failed
-
wrote on 24 Oct 2014, 07:43 last edited by
I'm trying to build the Qt 5.3.2 library for WEC7. For this purpose I followed those guidelines:
"Windows CE - Working with Custom SDKs":http://qt-project.org/doc/qt-5/windowsce-customization.html
"Installing Qt for Windows CE":http://qt-project.org/doc/qt-5/install-wince.htmlIf fulfilled all requirements. My Setup:
• Visual Studio 2008 Professional SP1
• Active Perl 5.3.16
• Windows Embedded Compact 7
• ARM Platform: Freescale i.MX6I created a Custom Build Specification:
• Created wince70embedded-iMX6-msvc2008 based on wince70embedded-armv4i-msvc2008
• Set CE_SDK = phyFLEX-i.MX6 SDK
• Set CE_ARCH = ARMv4I
• Added Preprocessor Definitions UNDER_CE, WINCE, $(ARCHFAM), $(ARCHFAM), _UNICODE, UNICODEAfterwards I
• Added C:\Qt\5.3.2_CE\qtbase\bin to PATH
• Used vcvars32.bat to set Environment variables
• configure -platform win32-msvc2008 -xplatform wince70embedded-iMX6-msvc2008
• Build using nmakeAfter a while the build fails with:
@ accessible\qaccessiblecache.cpp(69) : error C2143: syntax error : missing ';' be
fore '{'
accessible\qaccessiblecache.cpp(76) : error C2143: syntax error : missing ';' be
fore '}'
accessible\qaccessiblecache.cpp(79) : error C2143: syntax error : missing ';' be
fore '}'
accessible\qaccessiblecache.cpp(81) : error C2653: 'QAccessible' : is not a clas
s or namespace name
accessible\qaccessiblecache.cpp(82) : error C2143: syntax error : missing ';' be
fore '{'
accessible\qaccessiblecache.cpp(84) : error C2143: syntax error : missing ';' be
fore '}'
accessible\qaccessiblecache.cpp(86) : error C2653: 'QAccessible' : is not a clas
s or namespace name
accessible\qaccessiblecache.cpp(86) : error C2065: 'QAccessibleInterface' : unde
clared identifier
accessible\qaccessiblecache.cpp(86) : error C2065: 'iface' : undeclared identifi
er
accessible\qaccessiblecache.cpp(86) : error C2143: syntax error : missing ',' be
fore ')'
accessible\qaccessiblecache.cpp(87) : error C2143: syntax error : missing ';' be
fore '{'
accessible\qaccessiblecache.cpp(88) : error C2143: syntax error : missing ',' be
fore ')'
accessible\qaccessiblecache.cpp(92) : error C2143: syntax error : missing ',' be
fore ')'
accessible\qaccessiblecache.cpp(93) : error C2143: syntax error : missing ',' be
fore ')'
accessible\qaccessiblecache.cpp(95) : error C2653: 'QAccessible' : is not a clas
s or namespace name
accessible\qaccessiblecache.cpp(97) : error C2143: syntax error : missing ',' be
fore ')'
accessible\qaccessiblecache.cpp(98) : error C2143: syntax error : missing ';' be
fore '{'
accessible\qaccessiblecache.cpp(99) : error C2065: 'id' : undeclared identifier
accessible\qaccessiblecache.cpp(100) : error C2355: 'this' : can only be referen
ced inside non-static member functions
accessible\qaccessiblecache.cpp(100) : error C2143: syntax error : missing ',' b
efore ')'
accessible\qaccessiblecache.cpp(101) : error C2143: syntax error : missing ';' b
efore '}'
accessible\qaccessiblecache.cpp(102) : error C2065: 'iface' : undeclared identif
ier
accessible\qaccessiblecache.cpp(104) : error C2143: syntax error : missing ';' b
efore '}'
accessible\qaccessiblecache.cpp(107) : error C2143: syntax error : missing ';' b
efore '{'
accessible\qaccessiblecache.cpp(108) : error C2653: 'QAccessible' : is not a cla
ss or namespace name
accessible\qaccessiblecache.cpp(109) : error C2143: syntax error : missing ';' b
efore '{'
accessible\qaccessiblecache.cpp(110) : error C2143: syntax error : missing ',' b
efore ')'
accessible\qaccessiblecache.cpp(111) : error C2065: 'obj' : undeclared identifie
r
accessible\qaccessiblecache.cpp(112) : error C2143: syntax error : missing ';' b
efore '}'
accessible\qaccessiblecache.cpp(113) : error C2143: syntax error : missing ';' b
efore '}'
accessible\qaccessiblecache.cpp(115) : error C2653: 'QAccessible' : is not a cla
ss or namespace name
accessible\qaccessiblecache.cpp(115) : error C2065: 'obj' : undeclared identifie
r
accessible\qaccessiblecache.cpp(115) : error C2275: 'QObject' : illegal use of t
his type as an expression
accessible\qaccessiblecache.cpp(115) : error C2143: syntax error : missing ',' b
efore ')'
accessible\qaccessiblecache.cpp(116) : error C2143: syntax error : missing ';' b
efore '{'
accessible\qaccessiblecache.cpp(127) : error C2143: syntax error : missing ';' b
efore '}'
accessible\qaccessiblecache.cpp(130) : error C2143: syntax error : missing ';' b
efore '}'
accessible\qaccessiblecache.cpp(130) : fatal error C1004: unexpected end-of-file
found
Generating Code...
NMAKE : fatal error U1077: '"c:\Program Files (x86)\Microsoft Visual Studio 9.0
VC\ce\bin\x86_arm\cl.EXE"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"c:\Program Files (x86)\Microsoft Visual Studio 9.0
VC\BIN\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'@
The List is longer, but I can't post it all.What am I doing wrong? I'm new to QT and WEC7, so I hope you can point in the right direction.
-
wrote on 5 Nov 2014, 08:38 last edited by
I had the same problem. After using configure -xplatform wince70-myplatform-msvc2008 -developer-build -opensource -confirm-license -nomake tests -nomake examples -no-accessibility -opengl es2 -skip qtactiveqt -skip qtwinextras -skip qtlocation I was able to build the QT5 libraries. Unfortunately I was not able to build the quickcontrols libraries. Maybe "-no-accessibility" is responsible for that. But without this directive I get the same error as you.
-
wrote on 5 Nov 2014, 13:39 last edited by
I tried your configuration:
@c:\Qt\5.3.2_CE>configure -xplatform wince70embedded-iMX6-msvc2008 -developer-build -opensource -confirm-license -nomake tests -nomake examples -no-accessibility -opengl es2 -skip qtactiveqt -skip qtwinextras -skip qtlocation@
with my mkspec:
@# qmake configuration for Windows Embedded Compact 7 with VS2008 on ARM targets
This is just a template for creating WEC7 mkspecs for ARM targets
Replace the SDK name with actual SDK name.
include(../common/wince/qmake.conf)
CE_SDK = phyFLEX-i.MX6 SDK # replace with actual SDK name
CE_ARCH = armv4iDEFINES += QT_NO_CLIPBOARD QT_NO_ACCESSIBILITY QT_NO_NATIVE_GESTURES QT_NOSTANDARDSHELL_UI_MODEL _CRT_SECURE_NO_DEPRECATE _WIN32_WCE=0x700 $$CE_ARCH AMRV7 armv7 ARM UNDER_CE WINCE $(ARCHFAM) $(ARCHFAM) _UNICODE UNICODE
QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:WINDOWSCE,7.00 /MACHINE:THUMB /ENTRY:mainACRTStartup
QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:WINDOWSCE,7.00 /MACHINE:THUMB
QMAKE_LFLAGS_DLL = /SUBSYSTEM:WINDOWSCE,7.00 /MACHINE:THUMB /DLL /SAFESEH:NO
QMAKE_LIBFLAGS_RELEASE = /LTCG
QMAKE_LIBS = corelibc.lib coredll.lib
QMAKE_LIBS_CORE = 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_LIBS_NETWORK = ws2.lib $$QMAKE_LIBS_GUI
QMAKE_LIBS_OPENGL =
QMAKE_LIBS_COMPAT =
QMAKE_LIBS_OPENVG = libopenvg.lib
QMAKE_LIBS_OPENGL_ES2 = libEGL.lib libGLESv2.libQMAKE_RC = rc
QMAKE_COMPILER_DEFINES -= _MSC_VER=1400
QMAKE_COMPILER_DEFINES += _MSC_VER=1500@But now I get the following error:
@c:\qt\5.3.2_ce\qtbase\include\qtgui../../src/gui/opengl/qopengl.h(82) : fatal error C1083: Cannot open include file: 'GLES2/gl2.h': No such file or directory@
Are there any additional settings (Qt, Compiler, Visual Studio, Windows, PATH, etc.) I might have forgotten? Maybe even something that is not mention in the installation guide, but has to be set/configured for an WEC7 Application to work.
Where can I find a complete log file from the library build? Maybe there are even more Warnings/Errors that can give me a hint.
-
wrote on 5 Nov 2014, 14:55 last edited by
I am a Qt5 and WEC7 Newbie.
I have redirected my output to a file. So I could analyze the build errors. I also don't know where you can find the complete log file.I found the header files and libs for GLES2 in the SDK of my device. I think if your device provides OpenGLES2 support, it should provide headers and libs.
Additional to your configuration, I installed python (Active Python > = 2.6.x http://www.activestate.com/activepython/downloads , because I got python errors in my build log. And I ensured that perl is in my PATH.
I was able to build most of the libraries so that I can execute Widget and OpenGL applications on my device. Unfortunately QML applications are not running or the displayed window shows nothing (although QtQml.dll is built). For that I'm looking for a solution. Even a QML helloWorld program is not running when executing via qmlscene. Maybe a problem of missing ws2.dll or libgles2.dll on my device.
Can you please tell me if these dlls are available on your device?
-
wrote on 7 Nov 2014, 10:09 last edited by
After I disabled opengl with “-no-opengl” I was able to build the library, but I still cannot compile applications for my device. After the library build I added the default Qt/WinCE version in the Visual Studio Qt Options. Is it correct that I added the qtbase folder for 5.3.2? To get it working I had to copy my Build Specification folder "wince70embedded-iMX6-msvc2008" and rename it to default.
Now I can create an Qt Windows CE application, but the build throws a lot of errors.-
Cannot open include file: ‘QtGui/QMainWindow’
I changed that to ‘QtWidgets/QMainWindow’ and the error was gone, but I thought I should work out of the box. I also have Qt 4.8.6 installed as standard Windows version. Maybe Visual Studio mixes something up here? Because ‘QtGui/QMainWindow’ would bei correct for 4.8.6. -
Error C2039: ‘WFlags’: is not a member of ‘Qt’
Changed it to WindowFlags and the error was gone. -
Now I have several build errors:
@Error 1 error C2039: 'distance_type' : is not a member of 'QList<T>::const_iterator' C:\Program Files (x86)\Windows CE Tools\SDKs\phyFLEX-i.MX6 SDK\include\ARMv4I\utility
Error 2 error C2146: syntax error : missing ';' before identifier 'distance_type' C:\Program Files (x86)\Windows CE Tools\SDKs\phyFLEX-i.MX6 SDK\include\ARMv4I\utility
Error 3 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files (x86)\Windows CE Tools\SDKs\phyFLEX-i.MX6 SDK\include\ARMv4I\utility
Error 4 error C2602: 'std::iterator_traits<_It>::distance_type' is not a member of a base class of 'std::iterator_traits<_It>' C:\Program Files (x86)\Windows CE Tools\SDKs\phyFLEX-i.MX6 SDK\include\ARMv4I\utility
Error 5 error C2868: 'std::iterator_traits<_It>::distance_type' : illegal syntax for using-declaration; expected qualified-name C:\Program Files (x86)\Windows CE Tools\SDKs\phyFLEX-i.MX6 SDK\include\ARMv4I\utility
Error 6 error C2039: 'distance_type' : is not a member of 'QList<T>::const_iterator' C:\Program Files (x86)\Windows CE Tools\SDKs\phyFLEX-i.MX6 SDK\include\ARMv4I\utility
Error 7 error C2146: syntax error : missing ';' before identifier 'distance_type' C:\Program Files (x86)\Windows CE Tools\SDKs\phyFLEX-i.MX6 SDK\include\ARMv4I\utility
Error 8 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files (x86)\Windows CE Tools\SDKs\phyFLEX-i.MX6 SDK\include\ARMv4I\utility
Error 9 error C2602: 'std::iterator_traits<_It>::distance_type' is not a member of a base class of 'std::iterator_traits<_It>' C:\Program Files (x86)\Windows CE Tools\SDKs\phyFLEX-i.MX6 SDK\include\ARMv4I\utility
Error 10 error C2868: 'std::iterator_traits<_It>::distance_type' : illegal syntax for using-declaration; expected qualified-name C:\Program Files (x86)\Windows CE Tools\SDKs\phyFLEX-i.MX6 SDK\include\ARMv4I\utility
Error 11 error C2039: 'distance_type' : is not a member of 'QList<T>::const_iterator' C:\Program Files (x86)\Windows CE Tools\SDKs\phyFLEX-i.MX6 SDK\include\ARMv4I\utility
Error 12 error C2146: syntax error : missing ';' before identifier 'distance_type' C:\Program Files (x86)\Windows CE Tools\SDKs\phyFLEX-i.MX6 SDK\include\ARMv4I\utility
Error 13 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files (x86)\Windows CE Tools\SDKs\phyFLEX-i.MX6 SDK\include\ARMv4I\utility
Error 14 error C2602: 'std::iterator_traits<_It>::distance_type' is not a member of a base class of 'std::iterator_traits<_It>' C:\Program Files (x86)\Windows CE Tools\SDKs\phyFLEX-i.MX6 SDK\include\ARMv4I\utility
Error 15 error C2868: 'std::iterator_traits<_It>::distance_type' : illegal syntax for using-declaration; expected qualified-name C:\Program Files (x86)\Windows CE Tools\SDKs\phyFLEX-i.MX6 SDK\include\ARMv4I\utility
Error 16 error C2039: 'distance_type' : is not a member of 'QList<T>::const_iterator' C:\Program Files (x86)\Windows CE Tools\SDKs\phyFLEX-i.MX6 SDK\include\ARMv4I\utility
Error 17 error C2146: syntax error : missing ';' before identifier 'distance_type' C:\Program Files (x86)\Windows CE Tools\SDKs\phyFLEX-i.MX6 SDK\include\ARMv4I\utility
Error 18 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files (x86)\Windows CE Tools\SDKs\phyFLEX-i.MX6 SDK\include\ARMv4I\utility
Error 19 error C2602: 'std::iterator_traits<_It>::distance_type' is not a member of a base class of 'std::iterator_traits<_It>' C:\Program Files (x86)\Windows CE Tools\SDKs\phyFLEX-i.MX6 SDK\include\ARMv4I\utility
Error 20 error C2868: 'std::iterator_traits<_It>::distance_type' : illegal syntax for using-declaration; expected qualified-name C:\Program Files (x86)\Windows CE Tools\SDKs\phyFLEX-i.MX6 SDK\include\ARMv4I\utility
Error 21 error C2039: 'distance_type' : is not a member of 'QList<T>::const_iterator' C:\Program Files (x86)\Windows CE Tools\SDKs\phyFLEX-i.MX6 SDK\include\ARMv4I\utility
Error 22 error C2146: syntax error : missing ';' before identifier 'distance_type' C:\Program Files (x86)\Windows CE Tools\SDKs\phyFLEX-i.MX6 SDK\include\ARMv4I\utility
Error 23 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Program Files (x86)\Windows CE Tools\SDKs\phyFLEX-i.MX6 SDK\include\ARMv4I\utility
Error 24 error C2602: 'std::iterator_traits<_It>::distance_type' is not a member of a base class of 'std::iterator_traits<_It>' C:\Program Files (x86)\Windows CE Tools\SDKs\phyFLEX-i.MX6 SDK\include\ARMv4I\utility
Error 25 error C2868: 'std::iterator_traits<_It>::distance_type' : illegal syntax for using-declaration; expected qualified-name C:\Program Files (x86)\Windows CE Tools\SDKs\phyFLEX-i.MX6 SDK\include\ARMv4I\utility
...@
Should it really be that complicated to get Qt for Windows Embedded Compact to work?
-
-
wrote on 7 Nov 2014, 16:28 last edited by
I found my missing dlls in windows folder (hidden and protected).
Why not using Qt Creator?
Configuration of Kit
- Open a project in creator
- Projects – Manage Kits – Build&Run - QtVersions – Add
qmake location: choose qmake.exe from your qtbase build. - Apply
- Switch to tab Kit - Add
choose right compiler and Qt version, that you have created in previous step.
You can create a VS project from a creator project (qmake.exe -tp vc <project name>)
-
wrote on 10 Nov 2014, 11:57 last edited by
I never used Qt Creator before, so I thought it would be easier to start with Visual Studio. But now I tried it.
There were no build error's any more and after I added the missing dll's it was finally possible to run a simple Qt Application on my target.
Thank you!