Mailing Lists: Apple Mailing Lists

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

Annoying compiler warnings (repost)



Sorry for the repost, but it's been _quite_ a while, and I haven't seen my message show up. Of course, my sending this will guarantee that it will show up immediately, so if it does show up, please disregard this. Sorry.

Hey, all.

I'm writing quite a lot of code these days, and I've learned a few things.
For instance, the linker won't let me import the headers of classes that I use, just the one I'm inheriting from. So, I have to use @class to give the compiler a heads-up of the existence of classes that I'm using.

Problem is, when making use of these classes, the compiler isn't seeing the appropriate class definitions, just the heads-up (of course), so it's telling me that these classes don't respond to things which I know they respond to (because I wrote the damnable things), and it's defaulting a lot of method's return types to id (when they are actually things like int and double and classes and such).

It compiles fine, but it's still giving me far more warnings than I like seeing. I like seeing _zero_ warnings. But if I try importing the header of these classes, I get link errors, so it won't compile.
_Argh_.
Is there any way to defeat the link errors while still being able to import the headers so the compiler won't keep telling me that classes don'
t implement methods which they do, in fact, implement?

If it makes any difference, all this is part of a framework I'm making.

Thanks in advance,

-- Rob

For this is summer--we spin slowly on the edge of song. - Kira Byers




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.