Use of C++ in Photon; Software template.

I’m beginner in QNX/Photon.
I’m used to work with IDE such as VisualC++/MFC.
I have seen in Photon that C++ is useable (#ifdef _cpluscplus is mentionned …) : is it possible to set Photon in order to work in C++ and to generate, for example, some methods on C++ objects, instead of C callback with widget as first parameter ?
If it’s not possible, i’m afraid about structure of the software i have to build on Photon, only based upon callback : is there any typical software architecture on Photon environment (such as, for example, document/view in MFC …) ? have you got any advice about this problem ?

Thx for help !

It’s my understanding that that C++ is only available for graphical/Photon stuff with third-party stuff like Kirilla. I don’t think PhAb can be persuaded to substitute callbacks for C++ alternatives, but there are more knowledgeable people here who can confirm that.

I’ve never developed on Windows, so cannot compare it with QNX, but I suppose what kind of structure you se use will depend on what you’re writing, you could still go for an OO style using structures and stuff, not the same, but OK.

Cheers

Garry

If you want to do OO GUI programming on QNX, Java is definately your best bet.

Or you can use the Zinzala SDK and write your application using its OO framework … :slight_smile: But yes, PhAB only generate C-Photon code AFAIK.

Checks kirilla.com/qnx/articles/Introducing for an introduction
on Zinzala.

Cheers,

Jean-Louis

You can use PhAB and C++ just fine actually. The only issue is that you have to use static members for the callbacks. I normally shove the “this” pointer into Pt_ARG_USER_DATA pull it out in the callback and invoke the class instance method.

2 cdm:
I’m beginner too and I have same problem.
Could you please teach me how to use PhAB and C++ in one project?

If you read this article, you will know cdm is no longer working with QNX. You might want to shoot him an email cdm@killerstuff.net I am sure he wouldn’t mind to help us occasionally :slight_smile:

BTW, the Zinzala SDK is no longer a part of Kirilla … head over to www.hexaZen.com if you’ll like to try it out or find out more about it … :slight_smile:

jl