mordak / playbook-dev-tools

gcc for the Blackberry Playbook, and maybe some other stuff..
54 stars 31 forks source link

Issue about QNX_HOST and QNX_TARGET not defined in HELIUM app while running GCC for c files #18

Closed RAMAKRK closed 3 years ago

RAMAKRK commented 7 years ago

Hi All,

I have recently purchased Helium App , while compiling or executing C files using gcc in Helium app , the run output is showing "gcc: fatal error: environment variables QNX_HOST and QNX_TARGET not defined compilation terminated" But when checking these with BGshell using cmd : echo $QNX_HOST and echo $QNX_TARGET that means these environment variables are already set and gcc is also compiling and executing fine for 'c' files in bgshell.. But that gcc is not working in Helium Run Profile......>Kindly...suggest me further working process in my Blackberry Leap mobile. all instructions followed successfully while crosscompilation to my bb device . Please suggest me to get rid of this error and my mail id: ramakalyankv@live.com or ramakalyankv@gmail.com Thank you developers!!@@!!

mordak commented 7 years ago

The QNX_HOST and QNX_TARGET variables should be set in the process environment. By default, these variables are set in the env.sh script that is bundled with the zip archive that you installed on your device to get gcc, and this script is sourced by your .profile when you launch BGShell.

In order to get gcc to work in Helium, you just need to export these variables to your environment before your invoke gcc. I don't have Helium, so I have no idea how you might do this in Helium, but if you can invoke gcc, you can probably invoke a script that sources the env.sh file, then calls gcc.

The Helium devs may also have suggestions for how to set these environment variables before invoking gcc.