
Ignoring nonexistent directory "/usr/local/Cellar/llvm/3.2/bin/. "/usr/local/Cellar/llvm/3.2/bin/clang" -cc1 -triple x86_64-apple-macosx10.7.0 -emit-obj -mrelax-all -disable-free -main-file-name test.cpp -mrelocation-model pic -pic-level 2 -mdisable-fp-elim -masm-verbose -munwind-tables -target-cpu core2 -target-linker-version 128.2 -v -resource-dir /usr/local/Cellar/llvm/3.2/bin/./lib/clang/3.2 -fmodule-cache-path /var/folders/qf/j_7_sw0n093gn1y0mtsyztxh0000gn/T/clang-module-cache -stdlib=libc++ -std=c++11 -fdeprecated-macro -fdebug-compilation-dir /Users/zmanji/tmp -ferror-limit 19 -fmessage-length 203 -stack-protector 1 -mstackrealign -fblocks -fobjc-runtime=macosx-10.7.0 -fobjc-dispatch-method=mixed -fobjc-default-synthesize-properties -fencode-extended-block-signature -fcxx-exceptions -fexceptions -fdiagnostics-show-option -fcolor-diagnostics -o /var/folders/qf/j_7_sw0n093gn1y0mtsyztxh0000gn/T/test-k2Alf4.o -x c++ test.cppĬlang -cc1 version 3.2 based upon LLVM 3.2svn default target x86_64-apple-darwin11.3.0 Zameers-MacBook-Air:tmp zmanji$ clang++ -v -std=c++11 -stdlib=libc++ test.cppĬlang version 3.2 (tags/RELEASE_32/final) I tried sharth's answer below and now I am getting the error that the header does not exist. It seems that clang cannot find the header but I am not sure why. Test.cpp:2:10: fatal error: 'thread' file not found Library/Frameworks (framework directory) System/Library/Frameworks (framework directory)

Clang is the compiler built by Apple to compile C and a bunch of other languages.

Mostly because it’s already packaged in the system and you don’t need to install anything.

I am trying to compile the following C++ program which relies on the C++11 header. How to code c++ in mac Like Python, it’s easy to set up C in OS X.
