xcode Mac OS X Lion 没有 /usr/include 文件夹?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/14655154/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 02:41:55  来源:igfitidea点击:

Mac OS X Lion does not have /usr/include folder?

xcodemacos

提问by Ahmed

I have been trying to use SQLite API in a C++ program but I can not find the SQLite include files. I was told in this post Mac OSX sqlite api for C++that sqlite is alerady present on Mac OS X and headers can be found /usr/include.

我一直在尝试在 C++ 程序中使用 SQLite API,但找不到 SQLite 包含文件。我在这篇文章Mac OSX sqlite api for C++中被告知,在 Mac OS X 上已经存在 sqlite 并且可以在 /usr/include 中找到头文件。

I have a recently purchased MacBook Pro with Mac OS X Lion, Xcode 4.3.2 and there is no include folder in the /usr folder. /usr contains

我最近购买了带有 Mac OS X Lion、Xcode 4.3.2 的 MacBook Pro,并且 /usr 文件夹中没有包含文件夹。/usr 包含

  X11
  X11R6
  bin
  clang-ide
  lib
  libexec
  local
  sbin
  share
  standalone

Any suggestions?

有什么建议?

回答by Kurt Revis

You need to download and install the Xcode command-line tools. That link shows you how to do it from within Xcode.

您需要下载并安装 Xcode 命令行工具。该链接向您展示了如何在 Xcode 中执行此操作。