使用#include <>时如何修改.h文件的路径?

vv1*_*133 1 c gcc

当我们在linux平台中使用#include <stdio.h>时,编译器将在/ usr/include中搜索stdio.h.如何改变使用#include <>的路径?谢谢.

我之所以问这个问题:当我使用C标准函数isdigit()时,如果没有添加"#include <ctype.h>",程序会生成警告但没有错误.但是如果添加"#include <ctype.h>",链接时会产生错误.(我的编译器不是标准的gcc.)

我想知道为什么?

Kar*_*ath 5

 -I dir
     Add the directory dir to the list of directories to be
     searched for header files.  Directories named by -I are
     searched before the standard system include directories.
Run Code Online (Sandbox Code Playgroud)