"Qt No rule to make target" i cannot find the error
-
When compiling my project I am getting the error:
:-1: error: No rule to make targetlibgui.a', needed by
libdataaccess.a'. Stop.I analyzed the files pro, but could not find the error.
main pro file:
@TEMPLATE = subdirs
SUBDIRS +=
TecTrackerAdm
TecTrackerOpr
CoreOTHER_FILES += TecTracker.pri
@@TEMPLATE = subdirs
SUBDIRS +=
dataaccess
tests
gui@@#-------------------------------------------------
Project created by QtCreator 2014-07-23T14:15:58
#-------------------------------------------------
QT += sql
QT -= gui
TARGET = dataaccess
TEMPLATE = lib
CONFIG += staticlibSOURCES += dataaccess.cpp
HEADERS += dataaccess.hpp
unix {
target.path = /usr/lib
INSTALLS += target
}win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../gui/release/ -lgui
else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../gui/debug/ -lgui
else:unix: LIBS += -L$$OUT_PWD/../gui/ -lguiINCLUDEPATH += $$PWD/../gui
DEPENDPATH += $$PWD/../guiwin32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $$OUT_PWD/../gui/release/libgui.a
else:win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$OUT_PWD/../gui/debug/libgui.a
else:win32:!win32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $$OUT_PWD/../gui/release/gui.lib
else:win32:!win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$OUT_PWD/../gui/debug/gui.lib
else:unix: PRE_TARGETDEPS += $$OUT_PWD/../gui/libgui.a
@@#-------------------------------------------------
Project created by QtCreator 2014-09-02T13:39:00
#-------------------------------------------------
QT += widgets sql
TARGET = gui
TEMPLATE = lib
CONFIG += staticlibSOURCES +=
configconnec.cppHEADERS +=
configconnec.hpp
unix {
target.path = /usr/lib
INSTALLS += target
}FORMS += configconnec.ui
copyuifile.commands = $(COPY_DIR) $$PWD/configconnec.ui $$OUT_PWD
first.depends = $(first) copyuifile
export(first.depends)
export(copyuifile.commands)
QMAKE_EXTRA_TARGETS += first copyuifilewin32:CONFIG(release, debug|release): LIBS += -L$$PWD/../../../DynamicQtWidgets/build/release/ -ldynamicqtwidgets
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../../../DynamicQtWidgets/build/debug/ -ldynamicqtwidgets
else:unix: LIBS += -L$$PWD/../../../DynamicQtWidgets/build/ -ldynamicqtwidgetsINCLUDEPATH += $$PWD/../../../DynamicQtWidgets/build
DEPENDPATH += $$PWD/../../../DynamicQtWidgets/build
@ -
I suspect that your build is not able to find PRE_TARGETDEPS += $$OUT_PWD/../gui/release/libgui.a. Just check this directory and library file.
-
'libgui.a' does not exist in the directory because it has not yet been compiled. The project must first compile 'gui.pro' and then compile 'dataaccess.pro'. I think the compilation is not happening in that order.
-
It was how I imagined it was a matter of build order. I made changes to 'Core.pro'
@TEMPLATE = subdirs
SUBDIRS +=
gui
dataaccess
testsCONFIG += ordered
@The error stopped
-
Try to change the order of build like following ?
SUBDIRS +=
gui
tests
dataaccess -
Yes, it was changed, as shown in my last reply here. Already working.
Thank you for your help.
[quote author="Dheerendra" date="1409799816"]Try to change the order of build like following ?
SUBDIRS +=
gui
tests
dataaccess[/quote] -
my bad. I did not pay attention to your last line. Please move this issue to SOLVED state by changing the question to SOLVED state.