Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Programming / Mac Programming / October 2006



Tip: Looking for answers? Try searching our database.

error: macro "check" passed 3 arguments, but takes just 1

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Fonarix - 24 Oct 2006 08:22 GMT
Hello!
I have a problem with porting to XCode.
In CW code compiles well. But in XCode I've got the following:

error: macro "check" passed 3 arguments, but takes just 1

In code "check" is a macro, and virtual member of class.
Build fail on class member declaration "chak" with this message.
Michael Ash - 24 Oct 2006 13:16 GMT
> Hello!
> I have a problem with porting to XCode.
[quoted text clipped - 4 lines]
> In code "check" is a macro, and virtual member of class.
> Build fail on class member declaration "chak" with this message.

That's a really bad idea. Macros get applied long before the compiler
itself sees anything, and therefore aren't subject to namespaces. This
means that macros *must* be unique relative to basically everything else
in the areas where they are visible. If both the macro and the virtual
member are visible in the same place, then you must rename one of them.

This is why you usually see macro names in all caps, as it won't interfere
with other normally-named identifiers. Following this idea, you should
rename your macro to CHECK so it no longer conflicts with the virtual
member.

Signature

Michael Ash
Rogue Amoeba Software

Fonarix - 25 Oct 2006 16:29 GMT
> > Hello!
> > I have a problem with porting to XCode.
[quoted text clipped - 19 lines]
> Michael Ash
> Rogue Amoeba Software

Thanks for reply!
I've done #undef badmakros  )))
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.