Answer by Respiro for c++ #ifdef Mac OS X question
Small correction: #ifdef TARGET_OS_MAC will get you always true on both OS X and iOS, as it is defines either 0 or 1 depending on platform, but when APPLE is defined, TARGET_OS_MAC is defined as well,...
View ArticleAnswer by Jon Spencer for c++ #ifdef Mac OS X question
According to Microsoft, _WIN32 will cover both the 32-bit and 64-bit versions of Windows. And __APPLE__ works for Clang (at least in Mavericks). So one correct way to write the ifdefs above is:#ifdef...
View ArticleAnswer by koan for c++ #ifdef Mac OS X question
It depends on the compiler. #ifdef __APPLE__ works for gcc.
View ArticleAnswer by orlp for c++ #ifdef Mac OS X question
According to this answer:#ifdef __APPLE__ #include "TargetConditionals.h" #ifdef TARGET_OS_IPHONE // iOS #elif TARGET_IPHONE_SIMULATOR // iOS Simulator #elif TARGET_OS_MAC // Other kinds of Mac OS...
View Articlec++ #ifdef Mac OS X question
I am fairly new to C++. I am currently working on a group project and we want to make our classes compatible with both the lab computers (Windows) and my computer (Mac OS X). Here is what we have been...
View Article
More Pages to Explore .....