Skip navigation.
Home
The QNX Community Portal

View topic - adding existing c++ class to existing phAB project

adding existing c++ class to existing phAB project

Isn't the name clear?

adding existing c++ class to existing phAB project

Postby witos » Mon Jan 19, 2009 3:05 am

Hello everyone,

I've already read a couple of threads about my issue but none of them solved my problem.
Im writing acadmic project so that i dont have much time for that.
I've designed and developed phAB application with callbacks and so on. Everything is written i C and it containc proto.h. Now i would like to add my.cc file with header my.h and use some of implementhed metohods in my project (some of them in callbacks or maybe if there sie any other way which will solve that ?
Ok i tried not to make proto.h file
I also added -lang-C++ or sth like that to properties of compiler )also linker and tried to use .o files). Is it really so hard to use classes in that code ?

Thanbk you very much for any help
witos
Active Member
 
Posts: 11
Joined: Mon Jan 19, 2009 2:55 am

RE: adding existing c++ class to existing phAB project

Postby mario » Mon Jan 19, 2009 1:59 pm

Callback have to be static. Other then that no major problem. I believe there is a section about C++ in the documentation.
mario
QNX Master
 
Posts: 4132
Joined: Sun Sep 01, 2002 1:04 am

RE: adding existing c++ class to existing phAB project

Postby juanplacco » Mon Jan 19, 2009 4:35 pm

Which is the error message you get? Did you compile the c++ code (the class) externaly, and now you need to link agains it from an Photon application?.

FIrst aff all you have to compile your c++ code. Is just a class with some methods? or what?
juanplacco
Senior Member
 
Posts: 318
Joined: Wed May 17, 2006 2:30 pm


Return to GUI Programming

Who is online

Users browsing this forum: No registered users and 1 guest