[Qt-interest] How should sources in subdir be compiled?
Kārlis Repsons
k at 11.lv
Mon Mar 29 10:53:25 CEST 2010
On Monday 29 March 2010 08:38:19 Andre Somers wrote:
> Kārlis Repsons wrote:
> > It was most likely another thing, which made the problem with
> > MainWindow.moc, sorry for redundant post...
> >
> > ========================
> >
> > Now qmake says: WARNING: Failure to find: MainWindow.cpp and others.
>
> Ah!
> That is a warning to take to heart :-)
> You should add the paths where the other sources and headers can be
> found to your VPATH and your INCLUDEPATH. You can do that from the .pri
> files too. Sorry for forgetting to mention that.
So now its like this:
x.pro:
=======================
CONFIG += qt
DESTDIR = build
MOC_DIR = build
INCLUDEPATH = GUI
VPATH = GUI
include(GUI/GUI.pri)
SOURCES += main.cpp
RESOURCES += resources.qrc
=======================
GUI.pri:
=======================
HEADERS += MainWindow.h \
List.h \
Tabs.h
SOURCES += MainWindow.cpp \
List.cpp \
Tabs.cpp
=======================
And silly enough the same trouble comes back: "make: *** No rule to make
target `build/MainWindow.moc', needed by `MainWindow.o'. Stop." What else is
not right?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100329/3e292a89/attachment.bin
More information about the Qt-interest-old
mailing list