[SOLVED] qmake subdirs odd behaviour on OSX
-
Hello
I wanted to start a new subdirs project on OSX with Qt 4.7.3
here is my file tree
@myproj/
--myproj.pro
--myapp/
----myapp.pro
----main.cc
--libs/
----mylib/
------mylib.pro
------mylib.h
------mylib.cc@the pro files are quite straight-forward:
@myproj.pro:
TEMPLATE = subdirs
CONFIG += ordered
SUBDIRS += libs/mylib myapp
message("myproj")myapp.pro:
TEMPLATE = app
TARGET = myapp
message("myproj/myapp")INCLUDEPATH += ../libs/mylib
LIBS += -lmylibSOURCES += main.cc
mylib.pro:
TEMPLATE = lib
TARGET = mylib
message("myproj/libs/mylib")SOURCES = mylib.cc
HEADERS = mylib.h@The first problem was that mylib was considered as an app and make complains about missing refs to _main
I then edited myproj.pro (I added message call)
The problem is now that qmake doesn't parse the subdirs at all (the subdir messages are not printed)
running make gives:
@make: Entering directory `/path/myproj'
g++ -headerpad_max_install_names -o myproj.app/Contents/MacOS/myproj -F/Library/Frameworks -L/Library/Frameworks -framework QtGui -framework QtCore
Undefined symbols:
"_main", referenced from:
__start in crt1.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [myproj.app/Contents/MacOS/myproj] Error 1@
reverting to previous myproj.pro doesn't give the previous errorA similar project structure was working fine under 4.7.2
It looks like a bug to me. Please someone tell me if it worths bug filingAnd any help will be appreciated to make my project build !