Mixing Objective-C and C++ in Xcode
Mixing Objective-C and C++ in Xcode
- Subject: Mixing Objective-C and C++ in Xcode
- From: Albion Baucom <email@hidden>
- Date: Thu, 1 Jul 2004 09:37:02 -0700 (PDT)
I am new to Xcode and Mac development.
I have a program in Objective-C that compiled up to the point where I had
to integrate pre-written C++ code.
I am trying to compile a program that mixes C++ code and Objective-C. The
errors generated when I compile make it look as though Xcode does not
understand what a "class" is. Errors like this
error: parse error before "WebMOReader"
where WebMOReader is a class definition in a .h file like this
#include <fstream.h>
#include "MolecularIsosurface.h"
class WebMOReader
{
private:
...
and so forth. It doesn't matter whether I have the includes at the top of
the file or not. It just doesn't like "class Blah" for whatever reason.
I have included all the header files in a group that is a part of the
project, along with the corresponding source code (with a .cpp suffix).
Is there something special I have to do to make Xcode understand C++?
Is the suffix of the header file fooling it into thinking it is a Obj-C
header? What should I name it if so?
Thanks.
Albion
Albion E. Baucom
http://rna.ucsc.edu/albion
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.