c程序中包含的头文件的默认路径是什么? [英] what is default path for header file included in c program?

查看:214
本文介绍了c程序中包含的头文件的默认路径是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

看看我是否在任何c文件中编写

see if i write in any c file like

#include "header.h"

然后它将在当前目录中搜索该文件

then it will search this file in current directory

但是当我写

#include <header.h>

然后将在哪里找到该文件? C程序中包含的头文件的默认路径是什么?

then where it will go to find this file ? what is defualt path for header file included in c program?

看到我已经在/usr/local中安装了gstreamer,但是当我包括

see i have installed gstreamer in /usr/local but when i am including

#include <gst/gst.h>

我正在接受fatal error: gst/gst.h: No such file or directory

如何清除此错误?

推荐答案

搜索的路径取决于实现(和当前配置).查找包含路径的正确方法是使用pkg-config

The path searched depends on the implementation (and current configuration). The correct way to find the include path is to use pkg-config

pkg-config --cflags gstreamer

这篇关于c程序中包含的头文件的默认路径是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆