[Qt-creator] Problem with file including

André Hartmann andre.hartmann at iseg-hv.de
Tue Jul 14 07:01:18 CEST 2015


Hi Pawel,

Don't ask why, adding the current directory to project.includes helps :)

project.includes:

.
common


Anyway, don't know if this is worth a bug report.

Best regards,
André


Am 13.07.2015 um 21:09 schrieb Pawel:
> Hello,
>
> I want to reheat a problem which was issued some time ago but still
> isn't fully solved. Maybe this is because on Linux this works correctly
> and problem is on Windows.
>
> The problem is that QtCreator is not able to file included files when it
> should. Below is simplest case which illustrates this.
>
> We have two source files:
>
> *main.cpp:*/
> #include <common/header.h>
>
> int main()
> {
>       A a;
>       a.fun();
> }/
> *
> *
> *header.h:*
> /#ifndef HEADER_A_H
> #define HEADER_A_H
>
> class A
> {
> public:
>       void fun()
>       {
>       }
> };
>
> #endif/*
> *
> *
> *
> *
> *
> The directory structure looks like this:*
> *
> *D:*
> *├───* *project
> ├───**───* *common
> │                        header.h
> * *├───**───* *src
>                            main.cpp
> *
> *
> *
>  From this I create the project using "Import Existing Project" and the
> content of project files is as following:*
> *
> *
> *
> *project.config**
> *
> /// Add predefined macros for your project here. For example:
> // #define THE_ANSWER 42/*
>
> *
> *project.creator:
> *
> /[General]/
> *
> *
> *project.files:
> *
> /common/header.h
> src/main.cpp/*
> *
> *
> *
> *project.includes:
> *
> /common/*
> *
> *
> *
> *
> *
> So from this I would expect that QtCreator will searching the /common/
> directory for include files (and this happens on Linux) but it doesn't.
> Instead it just says: "'common/header.h' file not found".*
> *
>
> I will be very thankful for any advise for to fix this.
>
> best regards
> Pawel
>
>
>
> --
> Using Opera's mail client: http://www.opera.com/mail/
>
>
> ------------------------------------------------------------------------
> Avast logo <http://www.avast.com/> 	
>
> This email has been checked for viruses by Avast antivirus software.
> www.avast.com <http://www.avast.com/>
>
>
>
>
> _______________________________________________
> Qt-creator mailing list
> Qt-creator at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/qt-creator
>



More information about the Qt-creator mailing list