07.07.2011, 16:16, "Leandro T. C. Melo" <[email protected]>: > On 7/7/2011 1:37 PM, ext Konstantin Tokarev wrote: > >> 07.07.2011, 15:34, "Konstantin Tokarev"<[email protected]>;: >>> 07.07.2011, 15:14, "Schimkowitsch >>> Robert"<[email protected]>;;: >>>> Shouldn't it depend on whether I use >>>> >>>> #include "someheader.h" >>>> or >>>> #include<someheader.h> >>>> >>>> whether the compiler first checks the local folder or the include paths? >>> Of course it depends, but if you e.g. develop library, you must use<> >> I propose to search for target file in project file list first and then: >> >> if not found >> analyze all include paths >> else >> figure out which of found files goes first in include paths > > Hi Konstantin, > > this behavior is actually quite clear in the C++ standard. Basically it > says that if a search for a directive in the form > > #include "file.h" > > fails it should be reprocessed as if the directive is in the form > > #include <file.h> > > I think how exactly the search is done is implementation defined, but it > typically means to use a directory-based approach for the first case and > a compiler environment options/settings/flags approach for the second case.
Not exactly what I've meant: C++ searches "file.h" in current directory and then in ALL others. I propose to search in project paths first, both for "file.h" and <file.h> (the latter is needed to develop libraries) -- Regards, Konstantin _______________________________________________ Qt-creator mailing list [email protected] http://lists.qt.nokia.com/mailman/listinfo/qt-creator
