[Interest] QtCreator oddity

Christian Kandeler christian.kandeler at qt.io
Mon Apr 23 09:08:28 CEST 2018


On Fri, 20 Apr 2018 14:28:01 -0500
Roland Hughes <roland at logikalsolutions.com> wrote:

> On 04/20/2018 08:28 AM, Christian Kandeler wrote:
> >> Yes, there is a force here. Having to inform the environment about a
> >> directory underneath /usr/include is a force. By design all directories
> >> in that tree are searched.  
> > What makes you think that?
> >
> >
> > Christian  
> 30+ years in IT and the test posted earlier in this thread. I'm just 
> typing this in from memory as I'm not in my office.
> 
> cd /usr/include
> mkdir aa
> mkdir a.a
> cd aa
> copy  /usr/include/libusb...whatever/libusb.h .
> cd ../a.a
> copy  /usr/include/libusb...whatever/libusb.h .
> 
> No go into your QtCreator and in a .cpp file start typing
> 
> #include <a
> 
> What shows up? aa but not a.a
> Go ahead and hit enter, what shows up? libusb.h (or whatever you named 
> the .h file.

That's unrelated to your original claim that header files in subdirectories of /usr/include are magically found by compilers.



More information about the Interest mailing list