In IDE, I have created a phab project , and I have found that in src folder there are all c files . but now I have two files, one is *.h, the other is *.cpp.
In *.h, there is a header include file #include <exception>. and have a class I defined.

when I add these two files to SRC folder , there are some errors about exception . and In proto.h some errors about the declaration of the function of class .such as int A::b(), it can't understand ::, what shoud I do ?

In my opinion , maybe because the c Project can't deal with the exception . how I can solve it . thanks . maybe I can add some configuration. but I don't know how to do it ,

can someone give me some advice . Thanks a lot .

can I crate the phab C++ project ?
(notice : in other c++ project ,these two files can work very well)

Phab support C.if you want to use class.you may not use phab,and writeAPI directly

Phab does support c++. You need to specify file names with a .C, .cc, or

..cpp extension when defining your callbacks. When Phab sees that callback functions are in files ending with .C, .cc, or .cpp, it generates the necessary support for C++. Note well: All callback functions must be static and public. The this pointer needs to be attached to the module (using Pt_ARG_POINTER) so that the static callback function can call the appropriate instance function. Do not generate proto.h.

to JohnMcClurkin: my cpp file with class is not my callbacks. I have wrote it in editor. now the question is : In other callbacks, I want use this class in my cpp file.
to bilcar and alisa : if I use the API directly. what's the sentence for compile. cc or ohers ? I want to support the class and exception . please write for me in detail .
Thanks !

to JohnMcClurkin: my cpp file with class is not my callbacks. I havewrote it in editor. now the question is : In other callbacks, Iwant use this class in my cpp file.PhAB automatically generates code for C++ if it detects C++ files.

AFAIK, to make PhAB detect C++ files, specify that the callback functions be in filenames with a .C, .cc, or .cpp suffix. The callbacks themselves do not need to be class member functions, they just have to be in files with C++ type suffixes.

to bilcar and alisa : if I use the API directly. what's the sentencefor compile. cc or ohers ? I want to support the class andexception . please write for me in detail .Thanks !

to JohnMcClurkin: my cpp file with class is not my callbacks. I havewrote it in editor. now the question is : In other callbacks, Iwant use this class in my cpp file.

PhAB automatically generates code for C++ if it detects C++ files.AFAIK, to make PhAB detect C++ files, specify that the callbackfunctions be in filenames with a .C, .cc, or .cpp suffix. The callbacksthemselves do not need to be class member functions, they just have tobe in files with C++ type suffixes.

to bilcar and alisa : if I use the API directly. what's the sentencefor compile. cc or ohers ? I want to support the class andexception . please write for me in detail .Thanks !

I made it this way: I have rename my A.cpp file (where I have no callbacks) to A.cxx. In this case Phab will not insert c++ functions from my cxx file to proto.h. Than in common.mk file I have insert line EXTRA_SUFFIXES=cxx (I don't know if IDE automaticaly support this suffix).