Using OS X 10.10.2, I download Clang for Mac OS X v. 3.6.0, and try to compile a simple Hello World program.
The commands I use are these:
(assumes you downloaded clang
to .
)
cd .
./clang+llvm-3.6.0-x86_64-apple-darwin/bin/clang++ main.cpp
The result is this:
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
which makes sense, as there is no file unistd.h
, as verifiable by
find . -name unistd.h
which yields 0
results.
I tried downloading the LibC++ source code v. 3.6.0 but even that contains no unistd.h
. Where can I find the official/vanilla version of that file, and the files that are referenced, and meta-referenced, by it?
find / -name unistd.h
finds files only in/Applications/Xcode/*
, and I tried to get by without using Xcode. – Nichellenichol