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

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

firemonkey - How do I make a beep sound in Android using Delphi and the API? -