使用 OS X 10.10.2,我下载Clang for Mac OS X v. 3.6.0,并尝试编译一个简单的 Hello World 程序。
我使用的命令是:(
假设你下载clang
到.
)
cd .
./clang+llvm-3.6.0-x86_64-apple-darwin/bin/clang++ main.cpp
结果是这样的:
In file included from main.cpp:1:
In file included from ./clang+llvm-3.6.0-x86_64-apple-darwin/bin/../include/c++/v1/iostream:37:
./clang+llvm-3.6.0-x86_64-apple-darwin/bin/../include/c++/v1/__config:23:10: fatal error: 'unistd.h' file not
found
这是有道理的,因为没有文件unistd.h
,可以通过以下方式验证
find . -name unistd.h
这会产生0
结果。
我尝试下载LibC++ 源代码v. 3.6.0,但即使它不包含unistd.h
. 我在哪里可以找到该文件的官方/原版版本,以及它引用和元引用的文件?