Home
Developer Resources
QNX RTOS v4
QNX RTOS v4 Knowledge Base

QNX RTOS v4 Knowledge Base

Foundry27
Foundry27
QNX RTOS v4 project
Resources

QNX RTOS v4 Knowledge Base

Title Watcom C++ pre-processor include file quirk
Ref. No. QNX.000005912
Category(ies) Development
Issue Using "cc -c file.cc", I tried compiling the following very small files:

File 1:
x09#include <wcskip.h>
x09#include <wcskipit.h>
x09WCValSkipListSet<int > dummy;

File 2:
x09#include <wcskip.h>
x09WCValSkipListSet<int > dummy;
x09#include <wcskipit.h>

File 1 compiles without errors.  File 2 gives errors from deep in Wcskipit.h's include files.

The situation occured because I had a header file containing:
x09#include <wcskip.h>
x09class Derived : public WCValSkipListSet<Parameter > { ... };
and the corresponding source file containing
x09#include "header.h"
x09#include <wcskipit.h>

As far as I know, I have not made a technical error in organizing my include files.  What's the significance of this error in relation to the reliability of the Watcom C/C++ compiler.

Solution This actually *is* a technical error.  You're not supposed to do any work within your #include file lines. This affects the pre-processor.

This is an accepted compiler fact.