I have a simple QT subdir project with the structure of
TestProject/
TestProject.pro
Subdir1/
Subdir1.pro
sources/
main.cpp
Subdir2/
Subdir2.pro
headers/
mainwindow.h
sources/
mainwindow.cpp
Here are my .pro files TestProject.pro
TEMPLATE = subdirs
SUBDIRS += \
Subdir1 \
Subdir2
Subdir1.pro
SOURCES += \
main.cpp
Subdir2.pro
QT += sql
SOURCES += \
mainwindow.cpp \
HEADERS += \
mainwindow.h \
When I try to run the application I get the following error:
(.text+0x18):-1: error: undefined reference to `main'
I am using the Qt Creator IDE on Ubuntu 12.04. I have spent all morining trying to figure this out, What must I put in the .pro files in order for Qt to be able to build the project?
Thanks in advance