Re: Carbon-Cocoa Integration: Linking issue
Re: Carbon-Cocoa Integration: Linking issue
- Subject: Re: Carbon-Cocoa Integration: Linking issue
- From: "Kyle Sluder" <email@hidden>
- Date: Mon, 21 Jan 2008 22:00:43 -0500
On Jan 21, 2008 9:48 PM, Aaron Vegh <email@hidden> wrote:
> Except for the initial call to #include "MyController.m" at the top of
> the file, what you see here are the only instances of MyController in
> the file. How is it that there could be duplicate symbols? And why do
> system calls to the Cocoa library work okay (comment out all my
> controller calls, and NSLog DOES return the correct data), but not my
> own?
You can't do this. It's the exact same as if you had done #include
"foo.c". You need to #import "MyController.h" instead, otherwise
you'll wind up with two @implementations for MyController, one in
MyController.m and one in MyAppPlugin.m (by virtue of your #include
directive).
And yes, I meant use #import, not #include.
--Kyle Sluder
_______________________________________________
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