{"id":314,"date":"2010-10-18T09:57:56","date_gmt":"2010-10-18T14:57:56","guid":{"rendered":"http:\/\/www.jaimerios.com\/?p=314"},"modified":"2010-10-18T09:57:56","modified_gmt":"2010-10-18T14:57:56","slug":"how-to-detect-what-sdk-you-are-building-for-in-xcode","status":"publish","type":"post","link":"https:\/\/jaimerios.com\/?p=314","title":{"rendered":"How to detect what SDK you are building for in Xcode"},"content":{"rendered":"<p>I recently had to build a file for multiple operating systems and had to figure out a way to enable a feature that is only available on Mac OS X 10.5 and greater, and Windows.<\/p>\n<p>Here&#8217;s how I did it:<\/p>\n<pre lang=\"cpp\">#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) || defined (_WIN32)\n   #include <omp.h>\n#endif<\/pre>\n<p>Now, technically there is no harm with including omp.h with your Mac project, I&#8217;d like using that as an example as opposed to using Cocoa.h\/Afx.h.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I recently had to build a file for multiple operating systems and had to figure out a way to enable a feature that is only available on Mac OS X 10.5 and greater, and Windows. Here&#8217;s how I did it: #if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) || defined (_WIN32) #include #endif Now, technically there is no harm &#8230; <a title=\"How to detect what SDK you are building for in Xcode\" class=\"read-more\" href=\"https:\/\/jaimerios.com\/?p=314\" aria-label=\"Read more about How to detect what SDK you are building for in Xcode\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[114,291,338,398],"class_list":["post-314","post","type-post","status-publish","format-standard","hentry","category-coding","tag-checking-for-os-version","tag-macos","tag-openmp","tag-sdk"],"_links":{"self":[{"href":"https:\/\/jaimerios.com\/index.php?rest_route=\/wp\/v2\/posts\/314","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jaimerios.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jaimerios.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jaimerios.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jaimerios.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=314"}],"version-history":[{"count":0,"href":"https:\/\/jaimerios.com\/index.php?rest_route=\/wp\/v2\/posts\/314\/revisions"}],"wp:attachment":[{"href":"https:\/\/jaimerios.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=314"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jaimerios.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=314"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jaimerios.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=314"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}