Building with PhAB - newbie Question

Hi,

I’m trying to build a basic Photon application using PhAB and have a couple
of questions:

  1. I can edit abSfiles and abOfiles to add some non-PhAB generated source
    files but every time I generate it overwrites these files so I have to edit
    them again. Is there a way around this?

  2. How do I link against the TCP/IP libraries form a PhAB application?

TIA,

Richard.

Richard Copeman <richard.copeman@lauterbach.co.uk> wrote:
: Hi,

: I’m trying to build a basic Photon application using PhAB and have a couple
: of questions:

: 1) I can edit abSfiles and abOfiles to add some non-PhAB generated source
: files but every time I generate it overwrites these files so I have to edit
: them again. Is there a way around this?

: 2) How do I link against the TCP/IP libraries form a PhAB application?

Don’t edit any of the files that PhAB generates because – as you’ve found –
they get overwritten.

Tkae a look at the Photon Programmer’s Guide. In the Generating, Compiling,
and Running Code chapter, there’s a section called “Including non-PhAB files
in your application” that should help you with both of these questions.


Steve Reid stever@qnx.com
TechPubs (Technical Publications)
QNX Software Systems

Steve Reid <stever@qnx.com> wrote:
: Don’t edit any of the files that PhAB generates because – as you’ve found –
: they get overwritten.

Just to clarify: don’t edit the files named ab… that PhAB generates.


Steve Reid stever@qnx.com
TechPubs (Technical Publications)
QNX Software Systems

  1. I can edit abSfiles and abOfiles to add some non-PhAB generated source
    files but every time I generate it overwrites these files so I have to
    edit
    them again. Is there a way around this?

Use indSfiles, indOfiles and indHfiles instead.

  1. To link TCP/IP library in a photon application,you should first include
    the <sys/socket.h> in you programme,and then you have to include the
    ‘-lsocket’ option to the compiler,to do so,go your project folder and then
    the platform folder,you shall find the Makefile there,change the lines begin
    with ‘CC’,‘CXX’,‘LD’ as that:
    CC=qcc -lsocket
    CXX=qcc -lsocket
    LD=qcc -lsocket
    I am not sure whether it is the way that the QNX hopes ,but it sure works
    fine.If there are some other good comments,it will be very appreciated.

Best Regards.
ChaoLi


“Dmitri Ivanov” <ivdal@yahoo.com> wrote in message
news:ackvc0$cgp$1@inn.qnx.com

  1. I can edit abSfiles and abOfiles to add some non-PhAB generated
    source
    files but every time I generate it overwrites these files so I have to
    edit
    them again. Is there a way around this?

Use indSfiles, indOfiles and indHfiles instead.
\