PDA

View Full Version : Path to the previous folder



Zergi
15th July 2008, 17:23
Hi

I've stupid problem... I don't know how to give a correct path to the previous folder or file. In my project I've folder where I keep sources.cpp but header isn't in this folder, so how can I give path of the header to the sources? Have I write
#include "/home/zerg/workspace/header.h"?

example

header.h
[FOLDER] - > source1.cpp , source2.cpp

by default it is

#include "header.h but it's wrong because header isn't in the same folder...

ps
sorry for chaos of this post ;p If in this post are any mistakes pleas correct me ;d

Best Regards

fnmblot
15th July 2008, 17:50
../ in linux ..\ in windows

jpn
15th July 2008, 18:24
Use INCLUDEPATH (http://doc.trolltech.com/4.4/qmake-variable-reference.html#includepath):


INCLUDEPATH += path/to/headers