I’m trying to build a basic Photon application using PhAB and have a couple
of questions:
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?
How do I link against the TCP/IP libraries form a PhAB application?
: 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
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?
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.
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?