For modules written in C or C++, the general order of header file inclusion should be from most to least general:
Language | eg. <stdio.h> (C), <map> (C++) |
Operating system | eg. <unistd.h> (Unix), <windows.h> (Windows) |
Simics | eg. <simics/api.h> |
Application | specific 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.