Post subject: C++ class static methods in PhAb Posted: Nov 15, 2006 - 02:40 PM
Active Member
Joined: Aug 03, 2004
Posts: 62
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
ncostes
Post subject: RE: C++ class static methods in PhAb Posted: Nov 15, 2006 - 03:38 PM
Active Member
Joined: Aug 03, 2004
Posts: 62
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
Post subject: Re: C++ class static methods in PhAb Posted: Dec 11, 2006 - 02:38 PM
Guest
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:
Quote:
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
All logos and trademarks in this site are property of their respective owners. The comments are property of their posters. Powered by OpenQNX: The QNX Community Portal Site
QNX and the QNX logo are registered trademarks of QNX Software Systems.