• 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
Expected identifier or '(' and other errors occur after copying working code to a second machine
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Expected identifier or '(' and other errors occur after copying working code to a second machine


  • Subject: Expected identifier or '(' and other errors occur after copying working code to a second machine
  • From: "Saunderson, Rik" <email@hidden>
  • Date: Tue, 28 Oct 2014 13:44:11 +0000
  • Thread-topic: Expected identifier or '(' and other errors occur after copying working code to a second machine

Hi all,
We created an iOS app quite a while ago which works perfectly on the Mac on which it
was developed, but throws up errors when we try to compile it on a different Mac.
Both Macs are running version 5.0.2 of XCode and are building for iOS 6.1 for legacy
compatibility reasons.

In order to transfer it to the second Mac, we simply copied the entire source
directory onto a USB stick.  If this is the cause of my issues, then could
somebody let me know a better way to transfer projects.

The project has a number of dependencies pulled in through CocoaPods.  The Pods
project/target builds correctly on both laptops.

When trying to build the main project, we get several errors of the type:

*         Expected identifier or '('

*         Unexpected '@' in program

*         Missing context for method declaration

*         Expected method body

This is an example of the compilation errors on one of my header files (note
once again that the code is exactly the same as that which is compiles
correctly on the other Mac):
#import <UIKit/UIKit.h>
@interface DiagnosticViewController : UIViewController <UITextFieldDelegate>

@property (weak, nonatomic) IBOutlet UITextView *diagnosticReadout;
@property (weak, nonatomic) IBOutlet UITextField *connectionNameTextBox;  <-
Unexpected '@' in program
-(void) messageReceived:(NSString*)webPublisherMessage;
        <- Missing context for method declaration
@end
                                             <-Expected method body

All of the errors seem to be in .h files rather than in .m files.  Some, but not
all, of the issues seem to revolve around file a failing to pick up object types
defined in file b, although not all of the issues are caused by this.  I have
checked all of the header search paths and they all seem to be correct.

I have tried to doing a deep clean (Cmd + Opt + Shft + K), but this has not helped.
A colleague suggested that I should do a Perform Action -> Preprocess command
on the file in question, but since all of the files are .h files, this command is
not available.

Does anyone have any ideas about what's going on?  I can only assume that there's
something wrong with the build settings or include paths or something, but I've
checked through all of them and they all appear to be identical on both Macs.


Thanks,
Rik
Rik Saunderson
System Designer
BAE Systems Applied Intelligence
___________________________________________________________

T: +44 (0) 1483 81 7359 |  E: email@hidden

BAE Systems Applied Intelligence, Blue Fin Building, 110, Southwark Street, London SE1 0SU.
www.baesystems.com/ai<http://www.baesystems.com/ai>

Please consider the environment before printing this email. This message should be
regarded as confidential. If you have received this email in error please notify
the sender and destroy it immediately. Statements of intent shall only become
binding when confirmed in hard copy by an authorised signatory. The contents of
this email may relate to dealings with other companies under the control of BAE
Systems Applied Intelligence Limited, details of which can be found at
http://www.baesystems.com/Businesses/index.htm.
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: Expected identifier or '(' and other errors occur after copying working code to a second machine
      • From: Fritz Anderson <email@hidden>
    • Re: Expected identifier or '(' and other errors occur after copying working code to a second machine
      • From: Alex Zavatone <email@hidden>
    • Re: Expected identifier or '(' and other errors occur after copying working code to a second machine
      • From: Jerry Krinock <email@hidden>
    • Re: Expected identifier or '(' and other errors occur after copying working code to a second machine
      • From: Jens Alfke <email@hidden>
  • Prev by Date: Re: Extended Save Dialog Crashing
  • Next by Date: Re: Mac containment segues, and prepareForSegue
  • Previous by thread: Re: Extended Save Dialog Crashing
  • Next by thread: Re: Expected identifier or '(' and other errors occur after copying working code to a second machine
  • Index(es):
    • Date
    • Thread