So part of the problem I was having was caused by using the wrong compiler. My project was setup for gcc 4.0 somehow..
anyway, that didn't fix the problem. The basic problem is all the preprocessor macros except for TARGET_IPHONE_SIMULATOR were undefined in all build configurations. Also, TARGET_IPHONE_SIMULATOR is
never undefined, so just checking #if TARGET_IPHONE_SIMULATOR has not proven to be enough. The value of the macro does change between 1 and 0
I solved the problem by adding my own preprocessor macro to the debug builds, and checking the value of TARGET_IPHONE_SIMULATOR like so.
Code:
#if (TARGET_IPHONE_SIMULATOR == 1) || defined( _MY_DEBUG)
return;
#endif
You can define your own preprocessor macros in the project settings section
"GCC 4.2 Preprocessor".
Anyhow,
thanks for the code samples, they have been very informative and in testing, have proven to be very effective.