Re: Xcode cocoa project with c++
Re: Xcode cocoa project with c++
- Subject: Re: Xcode cocoa project with c++
- From: Jean-Daniel Dupas <email@hidden>
- Date: Wed, 19 Dec 2007 14:55:22 +0100
Le 19 déc. 07 à 14:51, Constantine a écrit :
Hi,
I met a problem some days ago like yours somehow.
I have a carbon app which calls a cocoa bundle. when I want to add
the "NSApplicationLoad()" function into my carbon app, though I've
already added the cocoa framework and included the <Cocoa.Cocoa.h>
head file in my .cpp file, when I compile my project, 2000+ errors
come out, also I see "error: expected unqualified-id before '@'
token".
Someone tells me to right-click my .cpp file, choose "Get Info", in
"File Type:" popup-button, change the "sourcecode.cpp.cpp" into
"sourcecode.cpp.objcpp"". Recompile it, and everything is ok~
Hope this can be helpful.
Renaming your .cpp into a .mm (ObjC++) will also do the trick.
_______________________________________________
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