A shot in the dark…

What are the line endings of the files (LF [UNIX/Mac], CR [legacy Mac], CRLF 
[Windows/Internet protocols]), and how are they set in the Text Editing panels 
of the Preferences window in the respective machines?

Inconsistent line endings have confused Xcode in the past, particularly for 
line numbering and live parsing, so the theory comes to mind.

Also, have you looked at the preprocessor output for those files? Get one for 
an .m file that leads to the error messages.

        — F


> On 28 Oct 2014, at 8:44 AM, Saunderson, Rik <rik.saunder...@baesystems.com> 
> wrote:
> 
> 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: rik.saunder...@baesystems.com
> 
> 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 (Cocoa-dev@lists.apple.com)
> 
> 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:
> https://lists.apple.com/mailman/options/cocoa-dev/fritza%40manoverboard.org
> 
> This email sent to fri...@manoverboard.org


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to