I have a QtCreator project which uses qmake and MingW and gcc (and Qt 5.9.4). When I run qmake in Debug mode, it generates a gcc command that is so long that it gets truncated. The truncated bit is the name and path of the source file, and so without surprise gcc directly exits with a fatal error : no input file.
The gcc commands generated by qmake (and found in the generated Makefiles) look like this :
<mode>/mtrx_2x2.o: ../<some path>/mtrx_2x2.c \
../<some path>/mtrx_2x2.h \
../<some path>/mtrx_struct.h \
../<some path>/mtrx_nxn.h
$(CC) -c $(CFLAGS) $(INCPATH) -o <mode>/mtrx_2x2.o ../<some path>/mtrx_2x2.c
<mode>
is either release
or debug
, depending on the chosen mode.
In Debug mode for that project (but not in Release for that project, and also not for any other project, be it Release or Debug), the variable INCPATH
expands to something much longer than in any other case, and that is what causes the truncation.
Specifically, most of my include folders listed with -I<path>
(also listed like this in Release mode for this project and in other similar projects) are also listed with -isystem"<path>"
(that's what's specific to Debug mode in that project).
Here the qmake command run by QtCreator :
C:\Qt\Qt5.9.4\5.9.4\mingw53_32\bin\qmake.exe <some path>/project.pro -spec win32-g++ "CONFIG+=debug" && C:/Qt/Qt5.9.4/Tools/mingw530_32/bin/mingw32-make.exe qmake_all
Of course, it's the same as other projects that do not give me such problems.
Anyone have any idea what's going on ?