First determine where libc++ is: It will be located within the Xcode app itself. If you have trouble finding it, preprocess a HelloWorld using Xcode and inspect it for the path to a std header.
Then on your command line point to the include
directory with -I
. You can also use -nostdinc++
to guarantee that no other std headers will be looked for:
$ /my/clang -std=gnu++11 -stdlib=libc++ t.cpp -nostdinc++ -I<path-to-libcxx>/include