You need to learn how the compiler looks for headers. In you case, you specified -IC:\boost, now when you do #include <some_header.h> the compiler will look for it in all directories passed to it via -I switch. If you #include <view.hpp> it will not find it, because view.hpp is in C:\boos\multi_array. So, you need to write
#include <multi_array/view.hpp> On 23 July 2010 14:45, Jothy <[email protected]> wrote: > I simply added INCLUDEPATH += -I C:\boost > > Now its able to find all the header files except file path starting with > boost/ > > Should I add C:\boost to system path? > > Thanks, > > Jothy > > > > On Fri, Jul 23, 2010 at 12:39 PM, André Pönitz <[email protected]>wrote: > >> On Friday 23 July 2010 11:53:31 ext Jothy wrote: >> > Hi Guys, >> > >> > I am trying to use boost header files with a simple Qt project in Qt >> creator. By right clicking "Add existing files" in the headers (in the >> project files view), I added few boost headers. >> > >> > And the pro file look like this >> > >> > QT += core gui >> > >> > TARGET = untitled8 >> > >> > TEMPLATE = app >> > >> > SOURCES += main.cpp\ >> > >> > widget.cpp >> > >> > >> > HEADERS += widget.h \ >> > >> > ../../Boost/multi_array/view.hpp \ >> > [..] >> > FORMS += widget.ui >> > >> > >> > Now, how should I add in the widget.cpp file. It does not show any of >> the hpp files after typing #include<, I even tried #include<Boost/ >> >> You should not list the boost headers in HEADERS, but add a suitable path >> to INCLUDEPATH, like >> >> INCLUDEPATH += $$PWD/../../Boost >> >> or >> INCLUDEPATH += $$PWD/../.. >> >> Andre' >> _______________________________________________ >> Qt-creator mailing list >> [email protected] >> http://lists.trolltech.com/mailman/listinfo/qt-creator >> > > > _______________________________________________ > Qt-creator mailing list > [email protected] > http://lists.trolltech.com/mailman/listinfo/qt-creator > >
_______________________________________________ Qt-creator mailing list [email protected] http://lists.trolltech.com/mailman/listinfo/qt-creator
