Re: pragma nowarn
Re: pragma nowarn
- Subject: Re: pragma nowarn
- From: Jean-Daniel Dupas <email@hidden>
- Date: Wed, 12 Dec 2007 14:16:51 +0100
Especially when you want to dynamically call methods from different SDKs, getting rid of the warnings can be a challenge. Example:
Take this code, which is compiled against the 10.2 SDK (but the issue is the same for any cross-SDK development):
if (floor(NSAppKitVersionNumber) > 663) // NSAppKitVersionNumber10_2 [center postNotificationName:myNotification object:nil userInfo:info options:(1 << 1)]; else [center postNotificationName:myNotification object:nil userInfo:info];
This will produce the following warning:
warning: `NSDistributedNotificationCenter' may not respond to `-postNotificationName:object:userInfo:options:' warning: cannot find method `-postNotificationName:object:userInfo:options:'; return type `id' assumed
For someone who likes his code warning free, I have found no way of getting rid of this warning. And I DO NOT want to turn off the "cannot find method" warning
Alex
You should not use 10.3 method with the 10.2 SDK. (it does not generate linker error thanks to the dynamic linking, but with C functions, it will failed) If you want to deploy on version from 10.2 to 10.4, you should compile using the 10.4 SDK, and set the min deployment target to 10.2.
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden