You still need to make sure the those env vars are set correctly.

The env vars are only needed when you use make and qnx recursive makefile method.
 
And you also still need to link against the qnx libc, unless you are doing a bootloader etc...

Agree, I linked the hello world program against qnx libc.  That's the method I use when I explicitly declare -nostdlib and qnx libc objects.