Compiling in QNX 4.25

I have a QNX 4.25 system, with Neutrino 2.0b3, and Photon 1.13. Eventually I’d like to develop an RT controller but I’m stuck at even getting a working version of hello.c. Here’s what I see:

qcc -o hello hello.c

cc: no target specified

qcc -V gcc_ntox86 -o hello hello.c


//1/hello terminated (SIGSEGV) at 0007:00000000
x1 144 Memory fault ./hello

I may be asking a very stupid question but I’ve looked everywhere on this site and at and can’t seem to figure out my problem. I’m terribly desperate so any help is tremendously appreciated.

Are you going to develop for QNX 4 or QNX 6 (also known as Neutrino) ?

  1. If QNX 4, you need to purchase and install the Watcom C/C++ compilers. Once installed, you should be able to
    cc -o hello hello.c

  2. If QNX 6, you can compile using “qcc” as you did above, BUT, you have to download the resulting “hello” to your QNX 6 target to run it. You can’t run a QNX 6 (neutrino) executable on QNX 4.

You are cross developing ;-) for QNX6 on QNX4

I am? :open_mouth: I was given a hard drive and some CDs and told to make it work. I’m trying to learn QNX as I go since no one in my lab has any QNX experience. Ultimately, I’m trying to use some Simulink generated code to develop an RT controller. However, there doesn’t seem to be a lot of documentation for what I intend to do. Other than the manuals that come with the install disks, is there any recommended readings that will bring me up to speed…yesterday!