回答編集履歴
2
sudo を削除しました
test
CHANGED
@@ -28,7 +28,7 @@
|
|
28
28
|
|
29
29
|
|
30
30
|
|
31
|
-
Xcode の Locations については、私も同じように `Command Line Tools: Xcode 7.2.1 (7C1002)` と表示されています。ちなみに、インストールは、ターミナルから `
|
31
|
+
Xcode の Locations については、私も同じように `Command Line Tools: Xcode 7.2.1 (7C1002)` と表示されています。ちなみに、インストールは、ターミナルから `xcode-select` と入力することで行いました。
|
32
32
|
|
33
33
|
|
34
34
|
|
1
include <\.\.\.> パスの確認方法について追記しました
test
CHANGED
@@ -15,3 +15,125 @@
|
|
15
15
|
|
16
16
|
|
17
17
|
limit は C++ 標準ライブラリの <limits> で定義されているようですので、もしかすると、nonoka さんの環境では、command line tools のセットアップがうまくいってないのかもしれません。
|
18
|
+
|
19
|
+
|
20
|
+
|
21
|
+
---
|
22
|
+
|
23
|
+
**2016年3月23日 9:40PM JST 追記**
|
24
|
+
|
25
|
+
|
26
|
+
|
27
|
+
Xcode 7.3 + OS X El Capitan にしても、ダメでしたか。
|
28
|
+
|
29
|
+
|
30
|
+
|
31
|
+
Xcode の Locations については、私も同じように `Command Line Tools: Xcode 7.2.1 (7C1002)` と表示されています。ちなみに、インストールは、ターミナルから `sudo xcode-select` と入力することで行いました。
|
32
|
+
|
33
|
+
|
34
|
+
|
35
|
+
状況としては C++ 標準ライブラリの <limits> が見つからないようなので、clang/LLVM コンパイラーの設定を確認してみましょう。ターミナルから `echo | clang -v -E -x c++ -` と入力してください。
|
36
|
+
|
37
|
+
|
38
|
+
|
39
|
+
私の環境では、以下のように表示されました。
|
40
|
+
|
41
|
+
|
42
|
+
|
43
|
+
```
|
44
|
+
|
45
|
+
mini:~ tatsuya$ echo | clang -v -E -x c++ -
|
46
|
+
|
47
|
+
Apple LLVM version 7.0.2 (clang-700.1.81)
|
48
|
+
|
49
|
+
Target: x86_64-apple-darwin15.4.0
|
50
|
+
|
51
|
+
Thread model: posix
|
52
|
+
|
53
|
+
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" -cc1 -triple x86_64-apple-macosx10.11.0 -Wdeprecated-objc-isa-usage -Werror=deprecated-objc-isa-usage -E -disable-free -disable-llvm-verifier -main-file-name - -mrelocation-model pic -pic-level 2 -mthread-model posix -mdisable-fp-elim -masm-verbose -munwind-tables -target-cpu core2 -target-linker-version 253.9 -v -dwarf-column-info -resource-dir /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/7.0.2 -stdlib=libc++ -fdeprecated-macro -fdebug-compilation-dir /Users/tatsuya -ferror-limit 19 -fmessage-length 145 -stack-protector 1 -mstackrealign -fblocks -fobjc-runtime=macosx-10.11.0 -fencode-extended-block-signature -fcxx-exceptions -fexceptions -fmax-type-align=16 -fdiagnostics-show-option -fcolor-diagnostics -o - -x c++ -
|
54
|
+
|
55
|
+
clang -cc1 version 7.0.2 based upon LLVM 3.7.0svn default target x86_64-apple-darwin15.4.0
|
56
|
+
|
57
|
+
ignoring nonexistent directory "/usr/include/c++/v1"
|
58
|
+
|
59
|
+
ignoring nonexistent directory "/usr/local/include"
|
60
|
+
|
61
|
+
#include "..." search starts here:
|
62
|
+
|
63
|
+
#include <...> search starts here:
|
64
|
+
|
65
|
+
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1
|
66
|
+
|
67
|
+
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/7.0.2/include
|
68
|
+
|
69
|
+
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include
|
70
|
+
|
71
|
+
/usr/include
|
72
|
+
|
73
|
+
/System/Library/Frameworks (framework directory)
|
74
|
+
|
75
|
+
/Library/Frameworks (framework directory)
|
76
|
+
|
77
|
+
End of search list.
|
78
|
+
|
79
|
+
# 1 "<stdin>"
|
80
|
+
|
81
|
+
# 1 "<built-in>" 1
|
82
|
+
|
83
|
+
# 1 "<built-in>" 3
|
84
|
+
|
85
|
+
# 332 "<built-in>" 3
|
86
|
+
|
87
|
+
# 1 "<command line>" 1
|
88
|
+
|
89
|
+
# 1 "<built-in>" 2
|
90
|
+
|
91
|
+
# 1 "<stdin>" 2
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
```
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
`#include <...> search starts here:` の後に、ディレクトリのパスが表示されますので、以下の2点を確認してください。
|
100
|
+
|
101
|
+
|
102
|
+
|
103
|
+
0. `/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1` が表示されていること。
|
104
|
+
|
105
|
+
0. ターミナルで `ls -l /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1` と入力した時に、以下のように `limits` を含む、一連のファイルが表示されること。
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
```
|
110
|
+
|
111
|
+
mini:~ tatsuya$ ls -l /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/
|
112
|
+
|
113
|
+
total 920
|
114
|
+
|
115
|
+
-rw-r--r-- 2 root wheel 52514 Sep 5 2015 __bit_reference
|
116
|
+
|
117
|
+
-rw-r--r-- 1 root wheel 18808 Sep 5 2015 __config
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
...(中略)...
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
-rw-r--r-- 2 root wheel 40484 Sep 5 2015 limits
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
...(中略)...
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
-rw-r--r-- 1 root wheel 109777 Sep 5 2015 vector
|
134
|
+
|
135
|
+
mini:~ tatsuya$
|
136
|
+
|
137
|
+
```
|
138
|
+
|
139
|
+
|