About PhAB

Hi! I’m just starting to use photon, and i started trying to use the tutorials that come in the help file, and trien to run them as standalos PhAB. I-m just trying to run de “Hello World” tutorial. I follow all the steps, but when I try to build and run it, nothing happens. It is build correctly with no errors, but it just doesn’t do anything. Hope somebody can help me with this, i would really appreciate it.

I don-t know if it has anything to do wiht the Run arguments or something like that… I just click OK when the window appears without typing anything on the ‘Run Arguments’ field… Thaks in advance!


Hello Antonio,
Build->Run should start your application in PhAB.
Just in case, go to //x86/o
And check whether the executable is there. Try to start your executable from the command line.
Again, PhAB Build->Run should do the trick.

I went to the directory, and there’s only a Makefile there… :s… what should i do? the compiling shows me no errors

thanks for your help by the way!.. :smiley:

Hello Antonio,
Please try
Build->Rebuild All
and post contents of Make Application window.

It is a standalone PhAB running on Neutrino, correct?
By the way, can you compile non-PhAB programs?


Yes I’m running a standalone PhAB… I actually haven’t tried to compile non-PhAB programs… I did try to compile the program form the IDE, but i keep getting an error about a link to -lAp…

I rebuilt the program as a standalone PhAB, and this is what apperars in the make Application window, as I mentioned before, this is just the Hello World tutorial that comes with the help file:

make -j 1 -Cx86 -fMakefile

make[1]: Entering directory `/fs/hd10-dos-1/PruebasTonio_QNX/HelloAntonio/x86’

make -j 1 -Co-g -fMakefile

make[2]: Entering directory `/fs/hd10-dos-1/PruebasTonio_QNX/HelloAntonio/x86/o-g’

/usr/qnx632/host/qnx6/x86/usr/bin/qcc -Vgcc_ntox86 -c -Wc,-Wall -Wc,-Wno-parentheses -I. -I/fs/hd10-dos-1/PruebasTonio_QNX/HelloAntonio/x86/o -I/fs/hd10-dos-1/PruebasTonio_QNX/HelloAntonio/x86/o-g -I/fs/hd10-dos-1/PruebasTonio_QNX/HelloAntonio/x86 -I/fs/hd10-dos-1/PruebasTonio_QNX/HelloAntonio -I/fs/hd10-dos-1/PruebasTonio_QNX/HelloAntonio/src -I/usr/qnx632/target/qnx6/usr/include -g -DVARIANT_g /fs/hd10-dos-1/PruebasTonio_QNX/HelloAntonio/src/abmain.c

/bin/rm -f /fs/hd10-dos-1/PruebasTonio_QNX/HelloAntonio/x86/o-g/HelloAntonio_g

/usr/qnx632/host/qnx6/x86/usr/bin/qcc -Vgcc_ntox86 -o/fs/hd10-dos-1/PruebasTonio_QNX/HelloAntonio/x86/o-g/HelloAntonio_g abmain.o -L. -L/usr/qnx632/target/qnx6/x86/lib -L/usr/qnx632/target/qnx6/x86/usr/lib -lAp -lAp -lph -lm -g

/usr/qnx632/host/qnx6/x86/usr/bin/usemsg -s __USAGENTO -s __USAGE -iVERSION -iTAGID /fs/hd10-dos-1/PruebasTonio_QNX/HelloAntonio/x86/o-g/HelloAntonio_g /fs/hd10-dos-1/PruebasTonio_QNX/HelloAntonio/src/Usemsg

phabbind HelloAntonio_g /fs/hd10-dos-1/PruebasTonio_QNX/HelloAntonio/wgt/Icon.wgti /fs/hd10-dos-1/PruebasTonio_QNX/HelloAntonio/wgt/Icon.wgtp /fs/hd10-dos-1/PruebasTonio_QNX/HelloAntonio/wgt/base.wgtw

make[2]: Leaving directory `/fs/hd10-dos-1/PruebasTonio_QNX/HelloAntonio/x86/o-g’

make[1]: Leaving directory `/fs/hd10-dos-1/PruebasTonio_QNX/HelloAntonio/x86’

I hope you can help me with this. Thank you very much Yuriy! :smiley:


Hello Antonio,
This looks normal to me.
But I have noticed the HD is mounted as /fs/hd10-dos-1.

Is it a DOS filesystem, as implied by its name?

If so, this may cause complications, partially because DOS filesystem doesn’t have an EXECUTE bit.
Make sure your home directory is always on QNX 4 filesystem, such as /home/<YOUR_NAME>


Hey! I tried that and it was it! :smiley:… it is working ok… Thank you very much!

Now… i have another question… what if I need to make a code callback to a *.cpp code that i’ve been working on? How do I add it to my project and make it work?


Hello Antonio,
My assumption is you have familiarized yourself with Tutorials 1-5 in Photon Programmer’s Guide. These examples show how to create a callback to C program.
As to C++ code, most likely it has a .cpp extension.

Default make settings only recognize .cc extensions. You can fix this by adding this line near the top of your common.mk file:


Some people find it easier to use C when working with Photon.