[Qt-creator] Adding header files

Jothy jothybasu at gmail.com
Fri Jul 23 13:29:00 CEST 2010


Seems to be getting closer to the solution!

Now it say the header files used by view.hpp cannot be found.Please see the
screenshot.
The header files used by view.hpp is like #include "boost/multi_array/base.hpp"
as shown in the screenshot.



Thanks,

Jothy

On Fri, Jul 23, 2010 at 12:18 PM, Alex T. <dioxinu at gmail.com> wrote:

> qmake does it for you. In order for qmake to generate Makefile it should
> read .pro file. You just made the modifications to .pro file, that's why you
> need to regenerate Makefile. As for Qt Creator, then I think you should go
> to Build menu and run 'Clean Project', then go to Build menu again and run
> 'Run qmake' and then Ctrl+B.
>
>
> On 23 July 2010 14:13, Jothy <jothybasu at gmail.com> wrote:
>
>> I am not creating any make file for my project.
>>
>> If so how to do that in Qt Creator. I don't want to build corss-platform
>> apps. If it runs on winodws thats fine.
>>
>> Thanks,
>>
>> Jothy
>>
>>
>> On Fri, Jul 23, 2010 at 12:10 PM, Alex T. <dioxinu at gmail.com> wrote:
>>
>>> No, I'm talking about makefiles for your own project.
>>>
>>>
>>> On 23 July 2010 14:01, Jothy <jothybasu at gmail.com> wrote:
>>>
>>>> No, in the boost website they say, we don't need to build them, we just
>>>> need to include them.
>>>>
>>>> I am just a beginner in c++ and don't know many of the concepts.
>>>>
>>>> But, I able to build simple applications with vtk!
>>>>
>>>> Thanks,
>>>>
>>>> Jothy
>>>>
>>>>
>>>> On Fri, Jul 23, 2010 at 11:54 AM, Alex T. <dioxinu at gmail.com> wrote:
>>>>
>>>>> Did you regenerate Makefiles?
>>>>>
>>>>>
>>>>> On 23 July 2010 13:51, Jothy <jothybasu at gmail.com> wrote:
>>>>>
>>>>>> Sorry for the mistake!
>>>>>>
>>>>>> Now set it to INCLUDEPATH += -IC:\Boost\multi_array
>>>>>>
>>>>>> it says view.hpp: No such file or dir
>>>>>>
>>>>>> Thanks,
>>>>>>
>>>>>> Jothy
>>>>>>
>>>>>>
>>>>>> On Fri, Jul 23, 2010 at 11:47 AM, Alex T. <dioxinu at gmail.com> wrote:
>>>>>>
>>>>>>> -L is the flag that refers to libraries, and has to be passed to
>>>>>>> vars as LIBS. the same with -l (lower el).
>>>>>>>
>>>>>>> -I (capital i)refers to includes.
>>>>>>>
>>>>>>> So this is not a good idea to pass -L to INCLUDEPATH. You need to
>>>>>>> double check ytour paths.
>>>>>>>
>>>>>>>
>>>>>>> On 23 July 2010 13:44, Jothy <jothybasu at gmail.com> wrote:
>>>>>>>
>>>>>>>> No, it says no such file or directory.
>>>>>>>>
>>>>>>>> I add INCLUDEPATH += -LC:\Boost\multi_array -lview
>>>>>>>>
>>>>>>>> Thanks,
>>>>>>>>
>>>>>>>> Jothy
>>>>>>>>
>>>>>>>>
>>>>>>>> On Fri, Jul 23, 2010 at 11:35 AM, Alex T. <dioxinu at gmail.com>wrote:
>>>>>>>>
>>>>>>>>> I don't think you need to add boost headers to HEADERS variable.
>>>>>>>>> Instead, add the path to boost headers to INCLUDEPATH variable, e.g.
>>>>>>>>>
>>>>>>>>> INCLUDEPATH += -I/home/user/my_unpacked_boost_headers/multi_array
>>>>>>>>>
>>>>>>>>> Note that is capital i before the path.
>>>>>>>>>
>>>>>>>>> After that just #include <view.hpp> in your sources.
>>>>>>>>>
>>>>>>>>> On 23 July 2010 12:53, Jothy <jothybasu at gmail.com> 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 \*
>>>>>>>>>>
>>>>>>>>>> *    ../../Boost/multi_array/types.hpp \*
>>>>>>>>>>
>>>>>>>>>> *    ../../Boost/multi_array/subarray.hpp \*
>>>>>>>>>>
>>>>>>>>>> *    ../../Boost/multi_array/storage_order.hpp \*
>>>>>>>>>>
>>>>>>>>>> *    ../../Boost/multi_array/range_list.hpp \*
>>>>>>>>>>
>>>>>>>>>> *    ../../Boost/multi_array/multi_array_ref.hpp \*
>>>>>>>>>>
>>>>>>>>>> *    ../../Boost/multi_array/iterator.hpp \*
>>>>>>>>>>
>>>>>>>>>> *    ../../Boost/multi_array/index_range.hpp \*
>>>>>>>>>>
>>>>>>>>>> *    ../../Boost/multi_array/index_gen.hpp \*
>>>>>>>>>>
>>>>>>>>>> *    ../../Boost/multi_array/extent_range.hpp \*
>>>>>>>>>>
>>>>>>>>>> *    ../../Boost/multi_array/extent_gen.hpp \*
>>>>>>>>>>
>>>>>>>>>> *    ../../Boost/multi_array/copy_array.hpp \*
>>>>>>>>>>
>>>>>>>>>> *    ../../Boost/multi_array/concept_checks.hpp \*
>>>>>>>>>>
>>>>>>>>>> *    ../../Boost/multi_array/collection_concept.hpp \*
>>>>>>>>>>
>>>>>>>>>> *    ../../Boost/multi_array/base.hpp \*
>>>>>>>>>>
>>>>>>>>>> *    ../../Boost/multi_array/algorithm.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/
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Any hints?
>>>>>>>>>>
>>>>>>>>>> Thanks,
>>>>>>>>>>
>>>>>>>>>> Jothy
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> _______________________________________________
>>>>>>>>>> Qt-creator mailing list
>>>>>>>>>> Qt-creator at trolltech.com
>>>>>>>>>> http://lists.trolltech.com/mailman/listinfo/qt-creator
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>> _______________________________________________
>>>>>>>>> Qt-creator mailing list
>>>>>>>>> Qt-creator at trolltech.com
>>>>>>>>> http://lists.trolltech.com/mailman/listinfo/qt-creator
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-creator-old/attachments/20100723/32b5354c/attachment.html 


More information about the Qt-creator-old mailing list