Compiler setup & old style compile errors and warnings when using Pi EGLFS toolchain.
-
wrote on 1 Feb 2019, 20:59 last edited by
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
-
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
wrote on 1 Feb 2019, 21:20 last edited by robopoulos 2 Jan 2019, 21:37Hmm, why didn't I test this then. Rather use
QMAKE_CFLAGS= gcc -std=c11sorry, 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 ?]
-
Hmm, why didn't I test this then. Rather use
QMAKE_CFLAGS= gcc -std=c11sorry, 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 ?]
1/3