What is the environment variable for GCC/G++ to look for .h files during compilation: LIBRARY_PATH, C_PATH, C_INCLUDE_PATH or CPLUS_PATH?

前端 未结 3 1956
一整个雨季
一整个雨季 2021-01-30 05:44

Is there an environment variable for GCC/G++ to look for .h files during compilation?

I google my question, there are people say LIBRARY_PATH, C_PATH, C_INCLUDE_PATH, CP

3条回答
  •  无人及你
    2021-01-30 06:16

    Also, if you're not sure which paths are being checked on your system you can use

    cpp -v

    Which will tell you which paths are being checked for .h files, the output includes sections:

    #include "..." search starts here:
    #include <...> search starts here:
    

提交回复
热议问题