PDA

View Full Version : help creating a project file



Slewman
22nd December 2009, 13: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 \
Shared

CONFIG += qt



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

SOURCES += IGManagerMain.cpp \
IGManager_config.cpp \
IGManager.cpp

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

Slewman
22nd December 2009, 14: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?

Slewman
22nd December 2009, 14: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

Slewman
22nd December 2009, 14: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?

Slewman
22nd December 2009, 14: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

high_flyer
22nd December 2009, 15:50
You can use -L for specifying link directories in the LIBS tag.
I suggest you read the qmake documentation:
http://doc.trolltech.com/4.5/qmake-manual.html

Slewman
22nd December 2009, 16: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

high_flyer
22nd December 2009, 16: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.

Slewman
22nd December 2009, 18: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?

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