Quantcast
Channel: c++ #ifdef Mac OS X question - Stack Overflow
Browsing latest articles
Browse All 5 View Live

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 Article



Answer 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 Article

Answer by koan for c++ #ifdef Mac OS X question

It depends on the compiler. #ifdef __APPLE__ works for gcc.

View Article

Answer 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 Article

c++ #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

Browsing latest articles
Browse All 5 View Live




Latest Images