/ usr / include不能用作xcode中的搜索路径?

时间:2014-07-25 05:25:56

标签: c++ xcode macos include-path armadillo

我在/ usr / include中安装了犰狳线性代数库,所以在xcode中我将这个目录添加到搜索路径中:

enter image description here

但xcode警告我无法找到犰狳文件:

enter image description here

然后我将库文件复制到/ tmp / arma /中,并将其添加到搜索路径中:

enter image description here

奇迹般地一切都变好了:

enter image description here

我现在真的很困惑。

更新

只是为了确认犰狳确实在/ usr / include:

kaiyin@kaiyins-mbp 07:30:09 | ~ =>
cd /usr/include/
kaiyin@kaiyins-mbp 07:30:20 | /usr/include =>
realpath armadillo
/usr/include/armadillo
kaiyin@kaiyins-mbp 07:30:25 | /usr/include =>
ll armadillo
-rw-r--r--  1 root  wheel    20K Jun  1 04:44 armadillo
kaiyin@kaiyins-mbp 07:31:24 | /usr/include =>
file armadillo
armadillo: ASCII C++ program text
kaiyin@kaiyins-mbp 07:31:29 | /usr/include =>
head armadillo
// Copyright (C) 2008-2014 Conrad Sanderson
// Copyright (C) 2008-2014 NICTA (www.nicta.com.au)
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.


#ifndef ARMA_INCLUDES
#define ARMA_INCLUDES
kaiyin@kaiyins-mbp 07:31:32 | /usr/include =>
diff /tmp/arma/armadillo armadillo
kaiyin@kaiyins-mbp 07:32:11 | /usr/include =>

所以它坐在那里和/ tmp / arma /

中的那个相同

1 个答案:

答案 0 :(得分:0)

是的,它适用于MAC。实际上它在任何类似Unix的系统中都能正常工作。