Phab and C++

Hi all,

I have some jpeg compression functions written in c++ and I am trying to get
them to compile in an Phab app. When I compile them in a non-photon program
using the “-lang-c++” directive they work fine (i.e. jpeg compressed images)
but when I try to compile them using Phab I get the following message for
all the c++ functions (-lang-c++ directive being used)

“proto :123: declaration of '***some func *** ’ outside of class is not
definition”

What do I need to do to solve this?

\

Greg Orvets
VP Engineering
Lambdat Tech International
www.lambdatech.com

Either make sure that your classes are defined in a header file that
is included before proto.h in all of your source files, or disable proto.h
generation and manually handle prototyping.

Greg Orvets <orvets@lambdatech.com> wrote:

Hi all,

I have some jpeg compression functions written in c++ and I am trying to get
them to compile in an Phab app. When I compile them in a non-photon program
using the “-lang-c++” directive they work fine (i.e. jpeg compressed images)
but when I try to compile them using Phab I get the following message for
all the c++ functions (-lang-c++ directive being used)

“proto :123: declaration of '***some func *** ’ outside of class is not
definition”

What do I need to do to solve this?


Greg Orvets
VP Engineering
Lambdat Tech International
www.lambdatech.com


cburgess@qnx.com

Colin Burgess <cburgess@qnx.com> wrote:

Either make sure that your classes are defined in a header file that
is included before proto.h in all of your source files, or disable proto.h
generation and manually handle prototyping.

A little bit more accurately:

disable proto.h generation,

and if any of your callbacks are class methods (BTW only static
methods are allowed as PhAB callbacks), make sure that their classes
are defined in the aplication’s “Global header” (or in something
that it includes).

Greg Orvets <> orvets@lambdatech.com> > wrote:
Hi all,

I have some jpeg compression functions written in c++ and I am trying to get
them to compile in an Phab app. When I compile them in a non-photon program
using the “-lang-c++” directive they work fine (i.e. jpeg compressed images)
but when I try to compile them using Phab I get the following message for
all the c++ functions (-lang-c++ directive being used)

“proto :123: declaration of '***some func *** ’ outside of class is not
definition”

What do I need to do to solve this?


Greg Orvets
VP Engineering
Lambdat Tech International
www.lambdatech.com


cburgess@qnx.com

Wojtek Lerch QNX Software Systems Ltd.

“Wojtek Lerch” <wojtek_l@yahoo.ca> wrote in message
news:a8uutp$gc7$1@nntp.qnx.com

A little bit more accurately:

disable proto.h generation,

and if any of your callbacks are class methods (BTW only static
methods are allowed as PhAB callbacks), make sure that their classes
are defined in the aplication’s “Global header” (or in something
that it includes).

You can write static cover methods for non-static methods by passing a

‘this’.

Thanks folks,

seems that disabling the protos works the best for me,

I use allot of c++ code

Greg,


Greg Orvets <orvets@lambdatech.com> wrote in message
news:a8sbhf$p8m$1@inn.qnx.com

Hi all,

I have some jpeg compression functions written in c++ and I am trying to
get
them to compile in an Phab app. When I compile them in a non-photon
program
using the “-lang-c++” directive they work fine (i.e. jpeg compressed
images)
but when I try to compile them using Phab I get the following message for
all the c++ functions (-lang-c++ directive being used)

“proto :123: declaration of '***some func *** ’ outside of class is not
definition”

What do I need to do to solve this?

\

Greg Orvets
VP Engineering
Lambdat Tech International
www.lambdatech.com