Re: c++ in obj-c cocoa apps (post-FAQ)
Re: c++ in obj-c cocoa apps (post-FAQ)
- Subject: Re: c++ in obj-c cocoa apps (post-FAQ)
- From: "R. Scott Thompson" <email@hidden>
- Date: Thu, 28 Oct 2004 11:50:22 -0500
On Oct 28, 2004, at 11:22 AM, Sean Gilbertson wrote:
I've read the section in the FAQ
<http://www.alastairs-place.net/cocoa/faq.txt> on including C++ code
in objective-C Cocoa apps, and I've also read what I can find on the
net, but I still have some questions:
- Is it feasible to include standard,
no-complaints-from-gcc-on-the-commandline C++ code in Cocoa-oriented
objective-c source files? I get plenty of errors about everthing from
syntax to not finding standard C++ includes (e.g. exception; string),
which seem to indicate that the compiler is assuming the code is
written in C rather than C++.
I include C++ code (including exception and string) in my Objective-C++
code "all the time". Are you using the ".mm" or ".M" extension on your
files?
- Can I compile a library of C++ classes separately, and use them in
Cocoa-oriented objective-c code?
Yes. I do that as well.
- If I can't include the code as-is, is there some preferably trivial
way I can alter it so that the compiler will like it?
Are your file name extensions correct?
Scott
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden