in reply to Why does order of #include's matter in XS file for C++ extensions under Windows?
In C, header files are always processed in the order the compiler finds them in. If a header of yours needs something from the standard headers and they have not been loaded yet, your header might define the thing it wants in a way it thinks will work. Having done that, the standard header may choose not to define the thing, since it sees that someone else has already done it. If the thing in question was a macro, syntax errors are possible.
So, it is usually best to put any headers that came with the compiler first, then include others (like the ones that came with perl or the ones you wrote yourself).
Phil
|
|---|