Thread in C++ in MacOS X
Thanks to pwny
and PeterT
, I figured out the error.
I just needed to compile with clang++ -std=c++11 minimal.cpp
and it worked like a charm.
I also needed a t.join()
at the end to prevent an execution error to happen.