构建C ++应用程序时,OSX系统包含文件的默认路径是什么? [英] What is the default path for OSX system include files when building a C++ application?

查看:149
本文介绍了构建C ++应用程序时,OSX系统包含文件的默认路径是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在命令行(使用 make 和开源库(Xerces 2.8))构建一个C ++应用程序。其中一个文件包括OSX系统文件,

I am building a C++ application at the command line (using make with an open-source library (Xerces 2.8)). One of the files includes an OSX system file,

#include <TextUtils.h>

当我键入 make -n 用于编译给定文件的命令,没有包含提供的系统框架文件的路径。因此,我假设在OSX上gcc编译器查找系统包含文件的默认位置。

When I type make -n to determine the command used to compile the given file, there is no include path for the system framework files provided. Therefore, I assume that on OSX the gcc compiler looks in a default location for system include files.

我想知道这个位置是什么。当我搜索 TextUtils.h 时,我看到不同位置的文件的许多版本,包括可能是默认位置的几个不同的可能候选。

I would like to know what this location is. When I search for TextUtils.h, I see many versions of the file in different locations, including a few different possible candidates for what might be a default location.

如何确定系统对系统包含文件使用的默认路径?

How can I determine the default path the system uses for system include files?

推荐答案

执行以下命令

# echo "" | gcc -xc - -v -E

将输出gcc的buildin配置,其中默认包括。

will output the buildin configuration of gcc among which are the default includes.

这篇关于构建C ++应用程序时,OSX系统包含文件的默认路径是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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