- We need to add additional flag for compiler which is -stdlib=libstdc++Older version of Mac OS X were using libstdc++ for compiling, but from version MAC OS X 10.9(June 10, 2013) this default settings has been changed tolibc++