C++ class static methods in PhAb

I’ve read the docs and looked at the table that shows how to specify
the functions in various ways (e.g. class::function_name@ and
class::function_name@filename.ext).

I can’t get these to generate a project that will build in any way
that uses static class members.

I can use a global C++ function just fine, but not class methods.

Has anyone successfully done this with PhAb? It’s supposed to work.

Thanks
Nick

Here is a sample program. The class is declared in RawDraw.h, the
implementation is in RawDraw.cpp.

If I put the declaration and implementation in RawDraw.h then all is
well (because abmain.cc includes it).

If not, the project never compiles RawDraw.cpp and if you compile it
by hand, the project doesn’t link it in with abmain.o

http://www.qrts.com/qnx/rawdraw4.tgz

Thanks
Nick

Try renaming your source file to RawDraw.cc. The .cc extension has been
recognized more consistently by more versions of QNX than .cpp (that’s
why PhAB generates abmain.cc rather than abmain.cpp).

ncostes wrote:

Here is a sample program. The class is declared in RawDraw.h, the
implementation is in RawDraw.cpp.

If I put the declaration and implementation in RawDraw.h then all is
well (because abmain.cc includes it).

If not, the project never compiles RawDraw.cpp and if you compile it
by hand, the project doesn’t link it in with abmain.o

http://www.qrts.com/qnx/rawdraw4.tgz

Thanks
Nick


Wojtek Lerch
QNX Software Systems