Cross compile QT5.8 on windows for Rpi

Sysprogs forums Forums Other tools & products Cross compile QT5.8 on windows for Rpi

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #10780
    tiagojanz
    Participant

    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-build

    TVale@DEVRPK01 /c/Users/TVale/downloads
    $ cd qt-build

    TVale@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 1

    TVale@DEVRPK01 /c/Users/TVale/downloads/qt-build

     

     

     

     

    thank you

    #10995
    grrizzly
    Participant

    Getting the exact same issue, any tips?

    #11123
    axeljaeger
    Participant

    I 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

    http://code.qt.io/cgit/qt/qtbase.git/commit/src/corelib/io/qsettings.cpp?id=60054b5940b19f4dd9780e63da1e2dce45baf131

    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

     

    #11124
    axeljaeger
    Participant

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

    #11706
    Landolfi
    Participant

    Hi all.

    I’m stuck at the same point. Any advice?

    Thank you

    #12207
    deod
    Participant

    +1 getting stuck

    Any update on this issue?

    @axeljaeger any luck with adding more headers?

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.