View Full Version : help creating a project file

22nd December 2009, 14:42
I have a project that I am trying to move over from Visual Studio to the QT Creator IDE. It is in a subdir structure and I have written all my *.pro files and have it nicely organized in my Qt Creator environment.

When i try to build the project I get countless "Cannot open include file" errors... even though the file is there and it is correctly included in one of the subdirs .pro files.

I feel like i am missing something here but im not sure what... here is my top level .pro file and an example of one of the subdir .pro files...

please any help would be greatly appreciated.

TEMPLATE = subdirs

SUBDIRS = AssetControlStub \
bin \
config \
ContextSetter \
Hub \
IGManager \
Logger \
MRPL_Parser \
ServiceGPS \
TactileEAI \
VideoManager \
VMux \
IGService \

CONFIG += qt

OTHER_FILES += Makefile.am
HEADERS += IGManager.h

SOURCES += IGManagerMain.cpp \
IGManager_config.cpp \

22nd December 2009, 14:58
include paths don't necessarily have to be part of your project.
You have to specify the include paths with INCLUDEPATH.

22nd December 2009, 15:01
what exactly do you mean? if a file in one directory is including another file in another subdirectory... i need to put that directory in the INCLUDEPATH variable?

22nd December 2009, 15:03
tried that and yea it fixed the problem...

is there a way i can do a top level include of everything haha... i have many subdirs and it would take forever to go through each and make sure im including the appropriate include paths

22nd December 2009, 15:21
well... it WAS working.. but for one of the project files in one of the subdirs it doesnt seem to be doing anything... all the files in this subdir reference a .h file that i put the path of said .h file into the include path and it is still not able to find it...

any suggestions?

22nd December 2009, 15:35
sorry to keep spamming you... but i got past the includepath issue... but now am having linking errors when trying to connect all the .obj files... how do i go aobut trying to fix this error?

sorry ive always been terrible with Makefiles and stuff like this... and ive tried looking online but even after reading some of the documentation on the issue im left scratching my head

22nd December 2009, 16:50
You can use -L for specifying link directories in the LIBS tag.
I suggest you read the qmake documentation:

22nd December 2009, 17:03
yea i looked through that documentation and added a few library directories to the .pro file

because this is a project that is already completed and im just moving it to Qt environment, there are a ton of Makefile.am that i am referencing to make sure i am getting all the libraries and what not... still, even after adding a few of these library directories to the pro files im getting the same number of errors... seems like adding the LIBS+= to the pro file didnt do anything

22nd December 2009, 17:52
well, its hard to say with out knowing exactly what you are doing.
In complex make file systems such as it looks you have, you can easily be doing all kinds of mistakes.
The simplest explanation would be that either the paths your are giving LIBS are wrong , or that the syntax you are using there is wrong, or, that this information is not being passed down to what ever makefile is generating the errors you get.

22nd December 2009, 19:51
you have been a big help and i really appreciate the time you have put in to give me some advice...

i have included the appropriate library files needed for my project but now i am getting linker errors... or at least thats what i think is happening... it does not know what to do with the *.obj files that are being created.. it compiles fine, but i am getting "unresolved external symbol" errors...

any thoughts?

23rd December 2009, 12:42
It would help if you could copy and paste here the full link command and error issues by the linker.