I’m actually porting an application from QNX4.25 to QNX6.3. I got a parse error when i try to compile and it doesn’t make sense for me. In QNX4 no problem to compile.
QNX 6 uses a completely different compiler than QNX 4. So it’s very possible.
Are you compiling C or C++ code as sometimes C++ compilation has errors like this due to more definitions in C++ than in C. It can even happen on .c files if you compile with the C++ option.
Just to last points if this is a standard, in QNX4, _STD should be define too and i have not this error ?
Second point, i’m compiling C code not C++, why _STD is defined ?
QNX4 and it’s compiler are SO old they came out before industry standards became common place.
However when I looked in cdefs.h, it appears _STD is only supposed to be defined when compiling C++ code. Since you only have C files, I’d say it’s probably due to your call to the compiler. How are you invoking the compiler in QNX6 (you should be using qcc)? There are some options to tell the compiler specifically to compile C only and to avoid the C++ include files.
I know that watcom is such an old compiler but the embebbed software i’m working on, was implemented 12 years ago
I call cc which is invoke qcc for C (normally). I tried to add -nostdinc++ and -nostdlib++ options but errors are similar. I guess, the only way is to rename…
In the meantime thanks for your help
If you look in the cdefs.h file you see that the only way _STD gets defined is if __cplusplus or CPLUSPLUS is defined. So somehow those are defined in your compilation. I know I specifically pass -lang-c++ to all my compilations to ensure C++ compiling. Even though it claims C is the default I wonder if you need to pass -lang-c specifically.
Unless you don’t mind re-naming that variable, I suggest looking closely at the compilation line with max verbosity to see what’s defined.
Yes i tried to add -lang-c -vv option, specify my target and the version of gcc by 3.3.1,gcc_ntox86. In gcc logs, i can see _LANGAGE_C so i presume CPLUSPLUS isn’t defined…I also tried to undefine CPLUSPLUS by -U __CPLUSPLUS option…Anyway, same result. Maybe it will be simpler to rename these enums.