Compiler setup & old style compile errors and warnings when using Pi EGLFS toolchain.



  • I have the toolchain working pretty well on both RPi 2 & 3 for Qt 5.10.1. However, the toolchain default setup uses an old compiler gcc 4.8.3 for C which leads to lots of old compile errors and warnings unless one can follow coding standards before C99. What would be the guidelines to get a later compiler version?

    [ To avoid most of the old errors by getting to C99 std level one can use the following option in the .pro file:
    QMAKE_CFLAGS += -std=c99 This is not documented (?) but it works, while I can't get QMAKE_CXXFLAGS to work.]

    Thanx



  • Hmm, why didn't I test this then. Rather use

    QMAKE_CFLAGS= gcc -std=c11

    sorry, late night errors, should be: QMAKE_CFLAGS += -std=c11

    to get up to C11 level with gcc 4.8.3 compiler.

    [Cxx flags are for C++ I assume, so that is why they do not affect C ?]


  • Qt Champions 2018

    @robopoulos

    [Cxx flags are for C++ I assume, so that is why they do not affect C ?]

    Correct.


Log in to reply