Use -std=gnu++0x instead of -std=c++0x Bluez uses the non standard "typeof" instead of "__typeof__" in bluetooth.h. Both GCC and Clang reject that with std=c++0x but accept it with gnu++0x.