0

I try to include *.pri file to my project (*.pro). The PRI file looks like this

INCLUDEPATH += $$PWD
DEPENDPATH += $$PWD

FORMS += $$PWD/*.ui
HEADERS += $$PWD/*.h
SOURCES += $$PWD/*.cpp

And try to compile my program with MinGW compiler for Qt 5.15.2. So the compiler outputs me an error:

g++: fatal error: cannot specify -o with -c, -S or -E with multiple files
mingw32-make[1]: *** [Makefile.Release:131: release/*.o] Error 1

while the MinGW compiler for Qt 5.13.2 successfully compiles the program without any questions.

On that line 131 in Makefile.Release I have

    $(CXX) -c $(CXXFLAGS) $(INCPATH) -o release\*.o here_my_path/src/*.cpp

So, what the problem is? Did the new QMake stop to support wildcards? Or it kind of a bug?

Alex Nevskiy
  • 347
  • 1
  • 2
  • 10
  • Possibly, I've found the solution - to embrace wildcards in $$files() functions like this FORMS += $$files($$PWD/*.ui) HEADERS += $$files($$PWD/*.h) SOURCES += $$files($$PWD/*.cpp). I think the question should be marked as solved, or removed if it is useless. – Alex Nevskiy Jun 03 '21 at 07:52
  • @talamaki Definitly yes. – Alex Nevskiy Jun 03 '21 at 13:00

0 Answers0