Qt project, no rule to make target needed by

One reason for this issue is because you have removed a file which you no longer need but forgot remove from res.qrc


I had this issue and it was because I had the wrong Kit selected under Projects>Build & Run


I would use QtCreator, opening the project and then adding one of the misplaced sources (let say the first you see in .pro).

The IDE should place it with the correct relative path, as appropriate per your folder choice. After that cut'n'paste the path prefix all over the remaining places.

Anyway, path prefixes should be relative to the directory where you find the .pro. An example from an opensource project I'm using (QZXIng, a Qt port of ZXing):

SOURCES += CameraImageWrapper.cpp \
    QZXing.cpp \
    imagehandler.cpp \
    zxing/ResultPointCallback.cpp \
    zxing/ResultPoint.cpp \
    zxing/Result.cpp \
    ...

so you could try to move the .pro file where appropriate instead of changing relative paths...

HTH


I have the same error. My pro file was

HEADERS       = \
                charectertranformer.h \
                filereader.h \
                svgview.h \
                threadfilereader.h \
                serverworker.h \
                renderserver.h
SOURCES       = \
                charectertranformer.cpp \
                filereader.cpp \
                main.cpp \
                svgview.cpp \
                threadfilereader.cpp \
                serverworker.cpp \
                renderserver.cpp \
QT += concurrent
QT += opengl
QT += network
QT += svg
CONFIG -= console
#CONFIG += warn_off exceptions_off
#qmake -svgviewer.pro

deleting backslash after renderserver.cpp helps me

Tags:

Makefile

Qt