Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C++ Mac preprocessor flag for base sdk

I have an include file which I need to include if building against the 10.7 SDK or higher, but should not be included otherwise (i.e. for 10.6 sdk). What preprocessor flag can I use in this case?

like image 315
Tamer Avatar asked Jan 16 '23 23:01

Tamer


1 Answers

Have a look at the Availability.h header, the __MAC_10_7 preprocessor token should do what you want.

#include <Availability.h>

#ifdef __MAC_10_7
    // Code that requires the Mac OS X 10.7 SDK or later
#endif
like image 127
Richard Viney Avatar answered Jan 20 '23 12:01

Richard Viney