View topic - About PhAB

About PhAB

Discussion about the general applications that run on QNX6

About PhAB

Postby samaantonio » Wed Apr 30, 2008 3:58 pm

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!

Antonio
samaantonio
Active Member
 
Posts: 23
Joined: Fri Feb 08, 2008 8:41 pm

RE: About PhAB

Postby ysinitsky » Wed Apr 30, 2008 5:11 pm

Hello Antonio,
Build->Run should start your application in PhAB.
Just in case, go to <YOUR DIRECTORY>/<PROJECT NAME>/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.
Regards,.
Yuriy
ysinitsky
Senior Member
 
Posts: 164
Joined: Wed Dec 14, 2005 8:46 pm

RE: About PhAB

Postby samaantonio » Wed Apr 30, 2008 8:02 pm

I went to the directory, and there's only a Makefile there... :s... what should i do? the compiling shows me no errors
samaantonio
Active Member
 
Posts: 23
Joined: Fri Feb 08, 2008 8:41 pm

RE: About PhAB

Postby samaantonio » Wed Apr 30, 2008 8:11 pm

thanks for your help by the way!... :D
samaantonio
Active Member
 
Posts: 23
Joined: Fri Feb 08, 2008 8:41 pm

RE: About PhAB

Postby ysinitsky » Wed Apr 30, 2008 8:37 pm

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?

Thanks,
Yuriy
ysinitsky
Senior Member
 
Posts: 164
Joined: Wed Dec 14, 2005 8:46 pm

RE: About PhAB

Postby samaantonio » Sun May 04, 2008 6:31 am

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! :D

Antonio
samaantonio
Active Member
 
Posts: 23
Joined: Fri Feb 08, 2008 8:41 pm

RE: About PhAB

Postby ysinitsky » Mon May 05, 2008 1:39 pm

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>

Thanks,
Yuriy
ysinitsky
Senior Member
 
Posts: 164
Joined: Wed Dec 14, 2005 8:46 pm

RE: About PhAB

Postby samaantonio » Thu May 08, 2008 9:55 pm

Hey! I tried that and it was it! :D... 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?

Antonio
samaantonio
Active Member
 
Posts: 23
Joined: Fri Feb 08, 2008 8:41 pm

RE: About PhAB

Postby ysinitsky » Fri May 09, 2008 1:06 pm

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:

EXTRA_SUFFIXES+=cxx cpp

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

Thanks,
Yuriy
ysinitsky
Senior Member
 
Posts: 164
Joined: Wed Dec 14, 2005 8:46 pm


Return to QNX6 - Applications

Who is online

Users browsing this forum: No registered users and 2 guests