Using the QNX6 Win32 hosted SDK?

Hi Guys,

Well I now have the QNX6 SDK installed on my Windows 2000 machine
(aftering re-sizing my disk partition as it gobbled up a whole gig!).
However I can’t for the life of me figure out from the instruction
manuals how to go about setting up the command line compiler environment
(I assume with MetroWerks there is no IDE support). From what I can tell
the files live in the QNXsdk\host\binwin directory (at least that is
where I can find qcc).

But what I can’t figure out is how to properly set up the command line
compile environment. What environment variables do I need to set (it
looks like QNX_HOST and QNX_TARGET have both been properly set by the
installer). What other environment variables need to be set? I tried
running the appbuilder (found it in a directory deeply buried somewhere)
and got some errors about the path which it looks like it got from my
Cygqin HOME environment variable. I have Cgywin also installed on the
machine (I use it for hosting my Linux GCC cross compiler), so will
there be a conflict with the QNX6 SDK and Cygwin?

What about paths to libraries and include files. Does the compiler
understand the INCLUDE and LIB environment variables, or do I need to
set things up such that my makefiles pass the correct paths via -I and
-L? I assume the compiler should know where to find the proper include
files and libraries for QNX6 itself from the QNX_TARGET environment
variable, correct?

Are there any sample programs that come with the SDK that I can use to
try out compiling and linking from the command line?

Finally how does one normally transfer files to the target machine? With
QNX4 I cross compile on my Win32 box and then simply run the apps
mounted via SAMBA drive mounts on my QNX4 box (marking the files as
system files makes them executeable :wink: Is SAMBA a standard part of the
QNX6 install, or will I need to track that down for my target machine?

Oh, one more thing and what debugger do people use to cross debug their
apps with QNX6? I assume that GDB is available, but I have no idea how
to get this to run in remote debugging mode (via TCP/IP is possible).
How do I go about doing this? Is there a GUI debugger available (since
command line GDB sucks really badly :wink:? On the target machine I see
that DDD is available, but can that be run on my Win32 machine for cross
debugging? Or do I need to dig up Phindows for QNX and run the debugger
remotely on the target machine?

Any help would be greatly appreciated as the QNX6 SDK docs seem a little
‘thin’.


±--------------------------------------------------------------+
| SciTech Software - Building Truly Plug’n’Play Software! |
±--------------------------------------------------------------+
| Kendall Bennett | Email: KendallB@scitechsoft.com |
| Director of Engineering | Phone: (530) 894 8400 |
| SciTech Software, Inc. | Fax : (530) 894 9069 |
| 505 Wall Street | ftp : ftp.scitechsoft.com |
| Chico, CA 95928, USA | www : http://www.scitechsoft.com |
±--------------------------------------------------------------+

Kendall Bennett wrote:

Hi Guys,

Well I now have the QNX6 SDK installed on my Windows 2000 machine
(aftering re-sizing my disk partition as it gobbled up a whole gig!).
However I can’t for the life of me figure out from the instruction
manuals how to go about setting up the command line compiler environment
(I assume with MetroWerks there is no IDE support). From what I can tell
the files live in the QNXsdk\host\binwin directory (at least that is
where I can find qcc).

But what I can’t figure out is how to properly set up the command line
compile environment. What environment variables do I need to set (it
looks like QNX_HOST and QNX_TARGET have both been properly set by the
installer). What other environment variables need to be set? I tried

Nothing that I know of.

running the appbuilder (found it in a directory deeply buried somewhere)
and got some errors about the path which it looks like it got from my
Cygqin HOME environment variable. I have Cgywin also installed on the
machine (I use it for hosting my Linux GCC cross compiler), so will
there be a conflict with the QNX6 SDK and Cygwin?

Haven’t ran into that. I am not even sure what that appbuilder is, it
sounds like PhAB but AFAIK Windows version of PhAB was not released yet.

What about paths to libraries and include files. Does the compiler
understand the INCLUDE and LIB environment variables, or do I need to
set things up such that my makefiles pass the correct paths via -I and
-L? I assume the compiler should know where to find the proper include
files and libraries for QNX6 itself from the QNX_TARGET environment
variable, correct?

Cross gcc knows where to get systems libs/headers from -b option,
normally. I think the QNX_TARGET has same effect for qcc wrapper which
they recommend to use. I am not sure about LIB/INCLUDE, you might have
to use -I & -L if you want to add your own dirs.

Are there any sample programs that come with the SDK that I can use to
try out compiling and linking from the command line?

Finally how does one normally transfer files to the target machine? With
QNX4 I cross compile on my Win32 box and then simply run the apps
mounted via SAMBA drive mounts on my QNX4 box (marking the files as
system files makes them executeable > :wink: > Is SAMBA a standard part of the
QNX6 install, or will I need to track that down for my target machine?

Depends on how ‘embedded’ the target is. Really embedded ones usually
work through TFTP. For PC-type target you are better off with SMB. You
don’t need Samba unless you insist on QNX box playing ‘server’ role.
Client side SMB protocol is implemented by fs-cifs which you can run on
your target (it allows to mount shares from Windows box). It is standard
component of OS.

Oh, one more thing and what debugger do people use to cross debug their
apps with QNX6? I assume that GDB is available, but I have no idea how
to get this to run in remote debugging mode (via TCP/IP is possible).
How do I go about doing this? Is there a GUI debugger available (since
command line GDB sucks really badly > :wink:> ? On the target machine I see
that DDD is available, but can that be run on my Win32 machine for cross
debugging? Or do I need to dig up Phindows for QNX and run the debugger
remotely on the target machine?

If you need visual debugger you either have to set up DDD or buy
Metrowerks (it comes with visual debugger which supports serial and
TCP/IP links to target). To run DDD you need X server for Windows, such
as Exceed, Xfree86-win32 or whatever. Phindows won’t help with that. You
also need X libs on target side (so DDD & GDB would run on target, just
set DISPLAY to your Windows host). You can run GDB remotely too, over
TCP/IP link (in which case you can use any GUI wrapper for it available
under Windows) but that is somewhat more complicated.

Any help would be greatly appreciated as the QNX6 SDK docs seem a little
‘thin’.

Yes, current tools & docs are pathetic. If I was you I’d call Harris @
QNX and ask about joining upcoming beta of new Eclipse-based IDE which
is to be demonstrated at ESC/SF (see press release on qnx.com). You will
really be MUCH better off with that (i’ve seen them). Perhaps even go
to SF, it will be worth your while. You’ll see everything and perhaps
get something right there and most of all you can make some personal
connections with staff there, which is invaluable if you’re going to do
serious work with QNX. I wish I could go myself sigh :wink:

  • igor

Igor Kovalenko <Igor.Kovalenko@motorola.com> wrote:

Yes, current tools & docs are pathetic. If I was you I’d call Harris @
QNX and ask about joining upcoming beta of new Eclipse-based IDE which
is to be demonstrated at ESC/SF (see press release on qnx.com). You will
really be MUCH better off with that (i’ve seen them). Perhaps even go
to SF, it will be worth your while. You’ll see everything and perhaps
get something right there and most of all you can make some personal
connections with staff there, which is invaluable if you’re going to do
serious work with QNX. I wish I could go myself sigh > :wink:

do you know who will be here in SF igor?
frank

That question is for Chris, he’s organizing the QNX Night there.

fliu@bb.vipstage.com wrote:

Igor Kovalenko <> Igor.Kovalenko@motorola.com> > wrote:
Yes, current tools & docs are pathetic. If I was you I’d call Harris @
QNX and ask about joining upcoming beta of new Eclipse-based IDE which
is to be demonstrated at ESC/SF (see press release on qnx.com). You will
really be MUCH better off with that (i’ve seen them). Perhaps even go
to SF, it will be worth your while. You’ll see everything and perhaps
get something right there and most of all you can make some personal
connections with staff there, which is invaluable if you’re going to do
serious work with QNX. I wish I could go myself sigh > :wink:

do you know who will be here in SF igor?
frank

On Tue, 5 Mar 2002 12:13:31 -0800, Kendall Bennett <KendallB@scitechsoft.com> wrote:

Hi Guys,

Well I now have the QNX6 SDK installed on my Windows 2000 machine
(aftering re-sizing my disk partition as it gobbled up a whole gig!).
However I can’t for the life of me figure out from the instruction
manuals how to go about setting up the command line compiler environment
(I assume with MetroWerks there is no IDE support). From what I can tell

In fact Metrowerks offers an IDE, it’s the current QNX SDK for Windows that
doesn’t have an IDE.

the files live in the QNXsdk\host\binwin directory (at least that is
where I can find qcc).

But what I can’t figure out is how to properly set up the command line
compile environment. What environment variables do I need to set (it
looks like QNX_HOST and QNX_TARGET have both been properly set by the
installer). What other environment variables need to be set? I tried
running the appbuilder (found it in a directory deeply buried somewhere)
and got some errors about the path which it looks like it got from my
Cygqin HOME environment variable. I have Cgywin also installed on the
machine (I use it for hosting my Linux GCC cross compiler), so will
there be a conflict with the QNX6 SDK and Cygwin?

I don’t know, but I think it will be a problem.
The command line should be set up for you during the install.
Look for the …qnxsdk/host/win32/binwin in your PATH.
Did you try e.g.: qcc -V gcc_ntoppcbe hello.c -o hello from the command line.

But what I can’t figure out is how to properly set up the command line
compile environment. What environment variables do I need to set (it
looks like QNX_HOST and QNX_TARGET have both been properly set by the
installer). What other environment variables need to be set? I tried
running the appbuilder (found it in a directory deeply buried somewhere)
and got some errors about the path which it looks like it got from my
Cygqin HOME environment variable. I have Cgywin also installed on the
machine (I use it for hosting my Linux GCC cross compiler), so will
there be a conflict with the QNX6 SDK and Cygwin?

This “SDK” is just bunch of qnx files plus windows files (cygwin port
of gcc,gdb and some binutils).
As far as I see QNX_HOST points to windows files like …\QNXsdk\host\win32
and QNX_TARGET points to qnx files QNXsdk\target\qnx6.
Yes, QNX supply their own copy of cygwin.dll and it may conflict to the
instance
you’ve got already.

What about paths to libraries and include files. Does the compiler
understand the INCLUDE and LIB environment variables, or do I need to
set things up such that my makefiles pass the correct paths via -I and
-L? I assume the compiler should know where to find the proper include
files and libraries for QNX6 itself from the QNX_TARGET environment
variable, correct?

Yes, see QNXsdk\host\win32\etc\qcc* for qcc configs. You always have to
run qcc with -Vgcc_ntox86 option.

Are there any sample programs that come with the SDK that I can use to
try out compiling and linking from the command line?

I guess printf(“Hello world!\n”); will do. :slight_smile:

Finally how does one normally transfer files to the target machine? With
QNX4 I cross compile on my Win32 box and then simply run the apps
mounted via SAMBA drive mounts on my QNX4 box (marking the files as
system files makes them executeable > :wink: > Is SAMBA a standard part of the
QNX6 install, or will I need to track that down for my target machine?

Though I understand that real programmers do not read docs but you can try
http://qdn.qnx.com/support/docs/neutrino_qrp/prog/devel.html

IMHO this windows SKD set of tools is kind of alien on windowz. I guess
the same package will be just fine on Solaris or Linux but not on Windows.
As couple of examples neither gcc nor gdb have a clue about windows drives
all the pathes are cygwin mounted dirs for them, that makes almost
impossible
to integrate them with other windows tools (I tried xemacs).
Sometimes the compiler cannot properly translate CR/LF unless you configure
cygwin.
So, if you are fine with command line string and willing to spend some time
to shape this beast then it is Ok otherwise add more monney and buy MW :frowning:

cheers,
Igor

fliu@bb.vipstage.com wrote:

Igor Kovalenko <> Igor.Kovalenko@motorola.com> > wrote:
Yes, current tools & docs are pathetic. If I was you I’d call Harris @
QNX and ask about joining upcoming beta of new Eclipse-based IDE which
is to be demonstrated at ESC/SF (see press release on qnx.com). You will
really be MUCH better off with that (i’ve seen them). Perhaps even go
to SF, it will be worth your while. You’ll see everything and perhaps
get something right there and most of all you can make some personal
connections with staff there, which is invaluable if you’re going to do
serious work with QNX. I wish I could go myself sigh > :wink:

do you know who will be here in SF igor?

I am trying to organize a “QNX Night in SF” for users/developers to come
and hang out and talk QNX. Please drop me an email and I will be sure
to update everyone early next week with details.

chris


Chris McKillop <cdm@qnx.com> “The faster I go, the behinder I get.”
Software Engineer, QSSL – Lewis Carroll –
http://qnx.wox.org/