FROM : Jeremy
DATE : Wed Mar 19 21:32:20 2008
Yes, I am. I have tried using both #include and #import, but neither
seems to work.
On Mar 19, 2008, at 4:22 PM, John Stiles wrote:
> Are you #including the header which declares MyClass?
>
>
> Jeremy wrote:
>> Hi.
>>
>> I am just starting to learn Cocoa and would like to use standard C+
>> + classes from my Objective C/C++ classes.
>> Is there any known documentation on how to do this, or does anyone
>> have any pointers?
>>
>> I tried creating a new object of my C++ class and calling a method
>> on it in a .m file and received a bunch of errors (including new
>> not being found).
>>
>> I then changed my .m file to a .mm file and all of the errors went
>> away except for one:
>> "cannot find interface declaration for 'MyClass'"
>>
>> The code in my .mm file is as such:
>>
>> m_pMemberVariable = new MyClass();
>> const unsigned int nRes = m_pMemberVariable->MyFunc();
>>
>> The second line gets the error. The new allocation in the first
>> line seems to compile fine.
>>
>> Do I need to create some sort of bridge class or method?
>>
>> Thanks,
>> Jeremy
>>
>> _______________________________________________
>>
>> Cocoa-dev mailing list (<email_removed>)
>>
>> 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:
>> http://lists.apple.com/mailman/options/cocoa-dev/<email_removed>
>>
>> This email sent to <email_removed>
DATE : Wed Mar 19 21:32:20 2008
Yes, I am. I have tried using both #include and #import, but neither
seems to work.
On Mar 19, 2008, at 4:22 PM, John Stiles wrote:
> Are you #including the header which declares MyClass?
>
>
> Jeremy wrote:
>> Hi.
>>
>> I am just starting to learn Cocoa and would like to use standard C+
>> + classes from my Objective C/C++ classes.
>> Is there any known documentation on how to do this, or does anyone
>> have any pointers?
>>
>> I tried creating a new object of my C++ class and calling a method
>> on it in a .m file and received a bunch of errors (including new
>> not being found).
>>
>> I then changed my .m file to a .mm file and all of the errors went
>> away except for one:
>> "cannot find interface declaration for 'MyClass'"
>>
>> The code in my .mm file is as such:
>>
>> m_pMemberVariable = new MyClass();
>> const unsigned int nRes = m_pMemberVariable->MyFunc();
>>
>> The second line gets the error. The new allocation in the first
>> line seems to compile fine.
>>
>> Do I need to create some sort of bridge class or method?
>>
>> Thanks,
>> Jeremy
>>
>> _______________________________________________
>>
>> Cocoa-dev mailing list (<email_removed>)
>>
>> 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:
>> http://lists.apple.com/mailman/options/cocoa-dev/<email_removed>
>>
>> This email sent to <email_removed>






Cocoa mail archive

