Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 01-14-2010, 11:38 PM   #46 (permalink)
F.R.E.E.
Registered Member
 
Join Date: May 2009
Posts: 72
F.R.E.E. is on a distinguished road
Default

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.
F.R.E.E. is offline   Reply With Quote
 

» Advertisements
» Online Users: 459
15 members and 444 guests
baja_yu, blueorb, edvaniojancy, esoteric, HemiMG, ilmman, isodev, jimmyon122, malaki1974, mediaspree, shigaugi, Sloshmonster, speed4mee, thebeast, ximagin
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,432
Threads: 94,026
Posts: 402,587
Top Poster: BrianSlick (7,978)
Welcome to our newest member, ximagin
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 07:18 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.