Different <stdio.h> in Version 6.0 and 6.21 ??? POSI

Hi Community

I’ve write this little nonsens Programm, because there
are diferences regarding compillation in the different versions of QNX.

1: #include<stdio.h>
3: int main (void)
4: {
5: printf(“Hallo Welt\n”);
6: fflush(stdin);
7: fprintf(stderr, “Client: ConectAttach failed\n”);
9: return 0;
10: }

If I compile it in QNX 6.0 everything is perfect no errors. → (qnx6.0.jpg)

But if I compile it in QNX 6.21, there are erors!! → (qnx6.21.jpg)

You can see the errors in the atachment as JPG.

is it possible that both versions use different header files?
<stdio.h> POSIX ???

Thank You All !!!

6.2.1 has a completely different libc than 6.0 - you need to use the 6.2.1 headers

I just cut/paste your example and it compiles fine on my QNX 6.2.1 box. no errors.

It seems your QNX 6.2.1 is screwed up. Try to re-install it.

BTW, fflush shouldn’t be used in input buffer. It just forces the writing of output ones :slight_smile:

Hi Community !!!

If they are completely different libc in both versions of QNX.

What should I do to compile my programms under qnx 6.21??

Thank You!!!

I would agree with noc - your system must be messed up somehow. You have 6.2 libs but 6.1 headers. I would re-install if you can.

Hi Community

I found the Problem

I’ve installed both,

QNX Momentics NC for Neutrino(x86)

and QNX Momentics NC for Neutrino (armle) !!!

after I install only QNX Momentics NC for Neutrino(x86) it works perfect.

Thank You !!!