You are using subdirs
template wrong. It should not contain anything, but SUBDIRS
and sometimes CONFIG += ordered
. Also your project model is a bit complicated. You should try something simplier first, without libraries and subprojects.
Good example of subdirs project: How to use QMake's subdirs template?
Update
I'll explain a bit. Minimal changes you need to do in your project in order it to compile & link:
- remove
SOURCES = $$PWD/Presenter/main.cpp
line from WiringClone.pro
- add
CONFIG += ordered
to WiringClone.pro
and View.pro
- remove
config \
line from WiringClone.pro
(this is the one that caused the original link error)
- order subprojects.
WiringClone.pro
: Utilities Model View Presenter
, View.pro
: Logic GUI
But, even after all these changes you'll have to solve an unsolvable problem: your Utilities
library depends on your Model
library, but your Model
depends on your Utilities
. Linking doesn't work this way. Cyclical dependencies are not allowed. That's why I recommend you to loose all your libraries and write a simple solid executable first.