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

gcc - MinGW's ld cannot perform PE operations on non PE output file -

timeout - Handshake_timeout on RabbitMQ using python and pika from remote vm -

c# - Search and Add Comment with OpenXML for Word -