Sysprogs forums › Forums › Other tools & products › Cross compile QT5.8 on windows for Rpi
- This topic has 5 replies, 5 voices, and was last updated 7 years, 2 months ago by deod.
-
AuthorPosts
-
March 23, 2017 at 11:56 #10780tiagojanzParticipant
Hi,
I followed the tutorial at https://visualgdb.com/tutorials/raspberry/qt/embedded/ but when I try to configure it gives this error
TVale@DEVRPK01 /c/Users/TVale/downloads
$ mkdir qt-buildTVale@DEVRPK01 /c/Users/TVale/downloads
$ cd qt-buildTVale@DEVRPK01 /c/Users/TVale/downloads/qt-build
$ ../qt-everywhere-opensource-src-5.8.0/configure -platform win32-g++ -xplatform linux-arm-gnueabi-
g++ -release -opengl es2 -device linux-rasp-pi2-g++ -sysroot C:/SysGCC/RaspberryQT57/arm-linux-gnue
abihf/sysroot -prefix /usr/local/qt5
+ cd qtbase
+ /c/Users/TVale/downloads/qt-everywhere-opensource-src-5.8.0/qtbase/configure -top-level -platform win32-g++ -xplatform linux-arm-gnueabi-g++ -release -opengl es2 -device linux-rasp-pi2-g++ -sysroot C:/SysGCC/RaspberryQT57/arm-linux-gnueabihf/sysroot -prefix /usr/local/qt5
Which edition of Qt do you want to use ?Type ‘c’ if you want to use the Commercial Edition.
Type ‘o’ if you want to use the Open Source Edition.o
This is the Qt Open Source Edition.You are licensed to use this software under the terms of
the GNU Lesser General Public License (LGPL) version 3.
You are also licensed to use this software under the terms of
the GNU General Public License (GPL) version 2.Type ‘L’ to view the GNU Lesser General Public License version 3.
Type ‘G’ to view the GNU General Public License version 2.
Type ‘yes’ to accept this license offer.
Type ‘no’ to decline this license offer.Do you accept the terms of either license? yes
Preparing build tree…
Creating qmake…
………………………………………………………..c:/Users/TVale/downloads/qt-everywhere-opensource-src-5.8.0/qtbase/src/corelib/io/qsettings.cpp:954:40: error: ‘KNOWNFOLDERID’ does not name a type
static QString windowsConfigPath(const KNOWNFOLDERID &type)
^
c:/Users/TVale/downloads/qt-everywhere-opensource-src-5.8.0/qtbase/src/corelib/io/qsettings.cpp:954:55: error: ISO C++ forbids declaration of ‘type’ with no type [-fpermissive]
static QString windowsConfigPath(const KNOWNFOLDERID &type)
^
c:/Users/TVale/downloads/qt-everywhere-opensource-src-5.8.0/qtbase/src/corelib/io/qsettings.cpp: In function ‘QString windowsConfigPath(const int&)’:
c:/Users/TVale/downloads/qt-everywhere-opensource-src-5.8.0/qtbase/src/corelib/io/qsettings.cpp:959:36: error: ‘KF_FLAG_DONT_VERIFY’ was not declared in this scope
if (SHGetKnownFolderPath(type, KF_FLAG_DONT_VERIFY, NULL, &path) == S_OK) {
^
c:/Users/TVale/downloads/qt-everywhere-opensource-src-5.8.0/qtbase/src/corelib/io/qsettings.cpp:959:68: error: ‘SHGetKnownFolderPath’ was not declared in this scope
if (SHGetKnownFolderPath(type, KF_FLAG_DONT_VERIFY, NULL, &path) == S_OK) {
^
c:/Users/TVale/downloads/qt-everywhere-opensource-src-5.8.0/qtbase/src/corelib/io/qsettings.cpp:965:21: error: ‘FOLDERID_ProgramData’ was not declared in this scope
if (type == FOLDERID_ProgramData) {
^
c:/Users/TVale/downloads/qt-everywhere-opensource-src-5.8.0/qtbase/src/corelib/io/qsettings.cpp:967:28: error: ‘FOLDERID_RoamingAppData’ was not declared in this scope
} else if (type == FOLDERID_RoamingAppData) {
^
c:/Users/TVale/downloads/qt-everywhere-opensource-src-5.8.0/qtbase/src/corelib/io/qsettings.cpp: In function ‘void initDefaultPaths(QMutexLocker*)’:
c:/Users/TVale/downloads/qt-everywhere-opensource-src-5.8.0/qtbase/src/corelib/io/qsettings.cpp:1069:64: error: ‘FOLDERID_RoamingAppData’ was not declared in this scope
const QString roamingAppDataFolder = windowsConfigPath(FOLDERID_RoamingAppData);
^
c:/Users/TVale/downloads/qt-everywhere-opensource-src-5.8.0/qtbase/src/corelib/io/qsettings.cpp:1070:61: error: ‘FOLDERID_ProgramData’ was not declared in this scope
const QString programDataFolder = windowsConfigPath(FOLDERID_ProgramData);
^
make.exe: *** [qsettings.o] Error 1TVale@DEVRPK01 /c/Users/TVale/downloads/qt-build
thank you
April 16, 2017 at 04:30 #10995grrizzlyParticipantGetting the exact same issue, any tips?
May 2, 2017 at 09:39 #11123axeljaegerParticipantI am having exactly the same issue. What I found out so far:
qsettings.cpp was changed between 5.7 and 5.8 to use KNOWNFOLDERID:
https://bugreports.qt.io/browse/QTBUG-50570
I do not see that qsettings.cpp includes Knownfolders.h that contains that typedef:
https://msdn.microsoft.com/en-us/library/windows/desktop/dd378457(v=vs.85).aspx
Things to try out:
- Try compiling Qt 5.7 and report whether this works and report any other issues because they will very likely also occur with 5.8 and we can find solutions for them in the meantime.
- Find Knownfolders.h. I was not able to find it using the windows search in the includepaths of my MinGW installation. Shouldn’t it be there and just including it in qsettings.cpp should solve the issue?
Best regars
Axel
May 2, 2017 at 10:04 #11124axeljaegerParticipantIt looks like the mingw that sysprogs offers for download and that we use to try to compile qmake on windows does not come with knownfolders.h.
I manually copied knownfolders.h and winapifamily.h from the Qt mingw to the include dir of the sysprogs mingw and added #include “Knownfolders.h” to qsettings.cpp. It went a bit further but ultimately failed again during compiling so I guess a bit more is missing.
To me it looks like sysprogs needs to include more header files to be able to compile 5.8 out of the box.
July 13, 2017 at 11:56 #11706LandolfiParticipantHi all.
I’m stuck at the same point. Any advice?
Thank you
August 29, 2017 at 08:52 #12207deodParticipant -
AuthorPosts
- You must be logged in to reply to this topic.