• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Build errors with linked static library in iPhone project under xcode 3.2.3
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Build errors with linked static library in iPhone project under xcode 3.2.3


  • Subject: Build errors with linked static library in iPhone project under xcode 3.2.3
  • From: Paul Summermatter <email@hidden>
  • Date: Thu, 01 Jul 2010 10:02:49 -0400

Folks,

We're trying to upgrade and build our iPhone project with Xcode 3.2.3.  Our project links with a static library/framework, and, as such, the source for this framework is rebuilt every time with our project.  Under Xcode 3.2.2, this framework built without warnings or issues.  Under 3.2.3, the code is failing to build with the following error:

warning: format not a string literal and no format arguments

Note that I said error, even though the output says warning.  Xcode flags this in red and fails to build the project because of it.  Here is the code which is generating this error:

NSString * const MyException     = @"MyException";
static NSString * const ExceptionMessage = @"Bindings are not supported on the iPhone in Core Plot";

-(void)aMethod:(NSObject *)anObject
{
#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE
    [NSException MyException format:ExceptionMessage];


So, I have a few questions: 1) the format is definitely a string literal, so why is the first part of this warning being generated (or is the grammar of the warning wrong/bad, and should it say "format not a string literal OR no format arguments") 2) why is this an error that is causing the build to fail 3) why is the behavior of the build different from 3.2.2 to 3.2.3?

What I've found is that, if I change the code as follows:

-(void)aMethod:(NSObject *)anObject
{
#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE
    [NSException MyException format:@"Bindings are not supported on the iPhone in Core Plot"];

There is no warning or error at all, even though the format still has no arguments.  I would at least expect to still get a warning that I have no arguments to format.  Further, if I create code in the main project (remembering that this code in question is in a static framework) that mirrors the original version of the code above, I get a build warning and not a build error.  So, as part of the same build, the same errant code in one spot generates a true warning and in another spot generates an error.

If anyone can help me to understand what the heck is going on, I would greatly appreciate it.

Regards,
Paul
 _______________________________________________
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

  • Follow-Ups:
    • Re: Build errors with linked static library in iPhone project under xcode 3.2.3
      • From: Christiaan Hofman <email@hidden>
    • Re: Build errors with linked static library in iPhone project under xcode 3.2.3
      • From: Paul Summermatter <email@hidden>
  • Prev by Date: Linking errors after upgrading to XCode 3.2
  • Next by Date: BetterAuthorizationSample question
  • Previous by thread: Re: Linking errors after upgrading to XCode 3.2
  • Next by thread: Re: Build errors with linked static library in iPhone project under xcode 3.2.3
  • Index(es):
    • Date
    • Thread