Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: build errors




On May 31, 2005, at 8:25 PM, D. Walsh wrote:

Source/AIMessageTabView.m:55: error: wrong type argument to unary minus
Source/AIMessageTabView.m:55: error: parse error before ':' token


Here is the code from at line 55 that seems to be generating the error.

- (void)displayTopTabs:(BOOL)value
{
    displayTopTabs = value; //the next time we are told to draw, we will only draw our top tabs (if YES)
}

I moved the source back to 10.3.9 and it builds without any problems.

My bet is that your machine thinks a .m file is C/C++, not Objective C.  It thinks you're trying to take the unary negation of the member function declaration.

In 10.4 I've set the target to 10.3, selected the 10.3.9 SDK but it still gives this error.

Anyone know how to fix this?

Look to see if any -x parameters are being passed to gcc in your build transcript that would override gcc's native handling of .m files. 

As a side question, how do I get XCode to use gcc 3.3 instead of gcc 4.0?


Two ways: one local to the target, one global to the machine.

The local way is Get Info on the target, click the Rules tab, scroll down to System C/C++ rule, and choose it there.

The global way is 
    $sudo gcc_select 3.3

in Terminal.

Chris

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/xcode-users/email@hidden

This email sent to email@hidden

References: 
 >build errors (From: "D. Walsh" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.