How to make PhaB compile with external .o files

Hi.

Background:
I’m currently working on what is essentially my own “hyperterminal” with a custom packet structure. (with functions like generate_packet(), insert_data_pk() etc). The application consists of a single process which is the GUI I have made in PhaB.

Problem:
I have the source file for the packet library (Packetx86.c) and the header (Packetx86.h). I have included my calls to the library in IPMS.c (my widget callback source file) along with #include “/root/some/random/path/Packetx86.h”. This means that IPMS.o will compile happily. But of course when it comes to building the application there is no Packetx86.o to link to so everything falls apart.

If PhaB didn’t have reign over the makefile I would just edit it myself to include Packetx86.o in the application build. However, since PhaB overwrites the makefile everytime you generate I was wondering if there is robust way to make PhaB know that it has to compile the extra stuff you need and to include it into the application build.

Cheers
dy

Which QNX version?

From the back of my mind I remember something like a indSfiles file within your project’s directory, try to put in Packetx86.c.

Got it:
http://www.qnx.com/developers/docs/momentics621_docs/photon/prog_guide/generating.html#IncludingNonPhABFiles

I have visited the above URL. why In my src ,there aren’t indHfiles and indSfiles. Only has abLfiles,abWfiles,indLfiles。 the version of qnx is 6.3.0
Thanksï¼

The ind*files should be generated when you “build” with PhAB.

hi ,maschoen !

I create phab project from IDE. and create gui with phab . then build and generate ui. In IDE ,I refresh the phab project and build it . in src. just have abdefine.h , adevent.h , abimport.h , ablibs.h , ablinks.h , abvars.h , abwidgets.h , proto.h , abmain.h , usemsg , abLfiles , abWfiles , anplatform , indLfiles.

What’s your version of qnx? maschoen.
Thanks!

I’m using QNX 6.3 with SP 1 installed. I don’t use the IDE so maybe that is the difference. Within PhAB I do a build and the ind*files are created.

I also have a try to create a gui with phab . and build it . In src, there is no differences. :frowning: :frowning: :frowning: :frowning: :frowning: :frowning:
god . Who know the reason!

I guess I have to backtrack. Maybe the last time I generated an application clean was under 6.2.1. I tried creating a new application, and as you have found, no indHfile, indOfile, or indSfile. There is an indLfile.
In my application I created a callback, and then had the callback call a routine in a different .c file. As if by magic, PhAB compiled the .c file, and linked with the .o file.

So I’m guessing this is all a new feature of 6.3 that I haven’t come across until now. So the question is, what that I’ve done, isn’t working on your system?

same for me (besides that I also included a header file for the external function)

If you copy the sourcefile to your ./PhABproject/src directory (or symlink it), then it should work, otherwise please post the error you get.

my version is 6.3.0 ,not 6.2.1. no indHfile, indOfile, or indSfile. There is an indLfile. and I want to add extra .h .cpp to indHfile and indSfile. but don’t have indHfile and indSfile .