OpenQNX :: The QNX Community Portal

Dec 01, 2008 - 06:25 PM
Google
  Web openqnx.com   
     Create an account Home · Submit News · QNX Forums · QNX Download · Search   
_
Main Menu
Who's Online
There are 25 unlogged users and 1 registered user online.

You can log-in or register for a user account here.

Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
ncostes
Post subject: C++ class static methods in PhAb  PostPosted: 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
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
ncostes
Post subject: RE: C++ class static methods in PhAb  PostPosted: 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

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

Thanks
Nick
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
Wojtek Lerch
Post subject: Re: C++ class static methods in PhAb  PostPosted: 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

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

Thanks
Nick



--
Wojtek Lerch
QNX Software Systems
 
   
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2007 The PNphpBB Group
Credits
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.