include - Does gcc search CPATH recursively? -


on linux system, gcc recursively search path declared in cpath environment variable, or need specify every includes sub-directory explicitly?

cpath specifies list of directories search. compiler searches directories, not sub-directories (so no recursive searching). is, given name #include "somedir/header.h", in directories specified via -i , -isystem , specified via cpath , add /somedir/header.h each of entries — , that's all.

this reasonable. if did recursive searching, you'd have worry getting order right files such <time.h> (because there's <sys/time.h> , might found recursive search).


Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -