Qt 4.5.3 linux error



  • Hi all,
    I installed the Qt 4.5.3 embedded linux version and tried to compile my previous code which compiled well with Qt 4.3.3. However, it gives me error messages about the qtconcurrentrunbase.h file. The errors are :

    /opt/qt/src/qt-embedded-linux-opensource-src-4.5.3-output/include/QtCore/qtconcurrentrunbase.h:65: error: expected identifier before "void"
    /opt/qt/src/qt-embedded-linux-opensource-src-4.5.3-output/include/QtCore/qtconcurrentrunbase.h:65: error: ISO C++ forbids declaration of parameter' with no type /opt/qt/src/qt-embedded-linux-opensource-src-4.5.3-output/include/QtCore/qtconcurrentrunbase.h:72: error: expected identifier before "void" /opt/qt/src/qt-embedded-linux-opensource-src-4.5.3-output/include/QtCore/qtconcurrentrunbase.h:72: error: ISO C++ forbids declaration ofparameter' with no type

    The qtconcurrentrunbase.h 65 and 72 are:
    @template <typename T>
    struct SelectSpecialization
    {
    template <class Normal, class Void> //65
    struct Type { typedef Normal type; };
    };

    template <>
    struct SelectSpecialization<void>
    {
    template <class Normal, class Void> //72
    struct Type { typedef Void type; };
    };@

    Anyone knows what's going on?


  • Lifetime Qt Champion

    Hi,

    What version of cross-compiler are you using ?

    And why such an old version of Qt ?


  • Moderators

    Seems that your compiler is treating "Void" the same as "void", which is wrong.



  • Thanks both for replying!
    Yeah that makes sense. I'm using the compiler arm_v5t_le-g++/gcc . Is there any workaround?

    @SGaist, the reason that I'm using 4.5.3 is that it's free. I have to use the embedded linux version. Not sure whether the qt-everywhere version (4.8) would work. I'm just trying to be safe. I guess I could try that too.


  • Moderators

    All Qt versions are free (LGPL or GPL), including Qt5. Although helping Digia make Qt by buying a commercial license is a nice thing to do :)



  • Thanks @sierdzio! I'm trying to build 4.8. The cross-compiling is a little bit tricky.

    [quote author="sierdzio" date="1362577553"]All Qt versions are free (LGPL or GPL), including Qt5. Although helping Digia make Qt by buying a commercial license is a nice thing to do :)[/quote]


  • Lifetime Qt Champion

    What version of arm cross compiler (i.e arm-linux-gcc 4.6) ?



  • Hey @SGaist,
    I'm using gcc (SUSE Linux) 4.4.1, same as g++. I tried to install 4.8, it gave the same error. Seems they used the same template ever after qt 4.5.
    Do you know any way to make it work? Thank you so so so much!

    [quote author="SGaist" date="1362579119"]What version of arm cross compiler (i.e arm-linux-gcc 4.6) ? [/quote]



  • No answers? Why doesn't gcc see the VOID? Can anyone help me?

    [quote author="curlingbunny" date="1362598953"]Hey @SGaist,
    I'm using gcc (SUSE Linux) 4.4.1, same as g++. I tried to install 4.8, it gave the same error. Seems they used the same template ever after qt 4.5.
    Do you know any way to make it work? Thank you so so so much!

    [quote author="SGaist" date="1362579119"]What version of arm cross compiler (i.e arm-linux-gcc 4.6) ? [/quote][/quote]


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.