Project Home
Project Home
Source Code
Source Code
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Starting Application with GUI from gdb: (5 Items)
   
Starting Application with GUI from gdb  
Hi all,

I am trying to start an application that uses Photon from gdb by commandline.
I am sure I am just missing something when setting up gdb, but I just get the Error "Ap: Unable to open resource file" 
when launching my binary.

My host system is Ubuntu with Momentics 4.6.0.

The Binary works fine, I can run it from IDE.
But I want to launch gdb from commandline.

I have tried to set the EnvVars (like PHOTON, PHOTON_PATH, LD_LIBRARY_PATH, PHFONT etc.), but it won't help.

I have tried to have a look at what the IDE does to start gdb, but it won't show any debug-output in the console.

Does anybody have a hint what to do?

Thanks,
Christian Reinecke
Re: Starting Application with GUI from gdb  
You can enable verbose mi log in your debug configuration dialogue, 
under 'Debugger' tab.

Or alternative 1:

on your target, open a terminal. Setup the environment so you can run 
your app from that terminal. Then slay qconn and start it again from 
that terminal.

or alternative 2:

When you set environment in gdb (using "set environment ..." command), 
make sure you did

(gdb) set nto-inherit-env off

so that gdb's environment actually gets set when the program is started.


HTH,

Aleksandar




On 08/09/2011 05:00 AM, Christian Reinecke wrote:
> Hi all,
>
> I am trying to start an application that uses Photon from gdb by
> commandline.
> I am sure I am just missing something when setting up gdb, but I just
> get the Error "Ap: Unable to open resource file" when launching my binary.
>
> My host system is Ubuntu with Momentics 4.6.0.
>
> The Binary works fine, I can run it from IDE.
> But I want to launch gdb from commandline.
>
> I have tried to set the EnvVars (like PHOTON, PHOTON_PATH,
> LD_LIBRARY_PATH, PHFONT etc.), but it won't help.
>
> I have tried to have a look at what the IDE does to start gdb, but it
> won't show any debug-output in the console.
>
> Does anybody have a hint what to do?
>
> Thanks,
> Christian Reinecke
>
>
>
> _______________________________________________
>
> General
> http://community.qnx.com/sf/go/post87916
>
Re: Starting Application with GUI from gdb  
Hello,

thanks for your reply.

I found out the following:
When I transfer the Binary from my Windows Host (i.e. via IDE->Target File System navifator or via SCP), I am able to 
run it.

But:
When I transfer the Binary (the same one!) to a Linux-Host (that also runs the QNX IDE) by FTP and from there to my 
target, the "Unable to locate Ap"-Error appears.

Do you know what happens there?
I am a bit confused, because I can't believe that FTP or SCP or "gdb upload" under Linux corrupt my Binary.

Regards, Christian
Re: Starting Application with GUI from gdb  
On 08/12/2011 07:41 AM, Christian Reinecke wrote:
> Hello,
>
> thanks for your reply.
>
> I found out the following:
> When I transfer the Binary from my Windows Host (i.e. via IDE->Target
> File System navifator or via SCP), I am able to run it.
>
> But:
> When I transfer the Binary (the same one!) to a Linux-Host (that also
> runs the QNX IDE) by FTP and from there to my target, the "Unable to
> locate Ap"-Error appears.

Could you be more specific? Error appears where?

How are you trying to run your app?

Could you post exact command line you use to run your app (i.e. telnet 
to your target and run your binary transferred from your linux box and 
post everything, including command line and any messages that follow).




Re: Starting Application with GUI from gdb  
Did you set bin mode in ftp?

On 08/12/2011 07:41 AM, Christian Reinecke wrote:
> Hello,
> 
> thanks for your reply.
> 
> I found out the following:
> When I transfer the Binary from my Windows Host (i.e. via IDE->Target File System navifator or via SCP), I am able to 
run it.
> 
> But:
> When I transfer the Binary (the same one!) to a Linux-Host (that also runs the QNX IDE) by FTP and from there to my 
target, the "Unable to locate Ap"-Error appears.
> 
> Do you know what happens there?
> I am a bit confused, because I can't believe that FTP or SCP or "gdb upload" under Linux corrupt my Binary.
> 
> Regards, Christian
> 
> 
> 
> _______________________________________________
> 
> General
> http://community.qnx.com/sf/go/post88055
>