Previous - Up - Next

8.4   Header Inclusion Order

For modules written in C or C++, the general order of header file inclusion should be from most to least general:

Languageeg. <stdio.h> (C), <map> (C++)
Operating systemeg. <unistd.h> (Unix), <windows.h> (Windows)
Simicseg. <simics/api.h>
Applicationspecific to your module

Observing this order is likely to minimise any problems of interference between include files. In particular, Simics may redefine some standard functions with preprocessor macros and this can cause problems unless the standard headers are included first.

Previous - Up - Next