<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">Cross-referencing <a href="https://urldefense.us/v3/__https://gitlab.com/petsc/petsc/-/issues/1254__;!!G_uCfscf7eWS!dXHKUheZr_zi40ctF3flLGD0N_qAfFixD8DHUmzFJXKbIKjQ1jFS1-kfRf_GGXnljrjgjIyvcP-9POvAjSl8zA$">https://gitlab.com/petsc/petsc/-/issues/1254</a><div><br></div><div>Thanks,</div><div>Pierre<br id="lineBreakAtBeginningOfMessage"><div><br><blockquote type="cite"><div>On 21 Aug 2024, at 8:15 PM, meator <meator.dev@gmail.com> wrote:</div><br class="Apple-interchange-newline"><div><div>Hello. I have skimmed through PETSc's documentation to see whether PETSc has any special policy for including header files, but I didn't find anything, so I assume that standard C rules apply.<br><br>The problematic header file is <petscerror.h>. The following code doesn't compile:<br><br>    #include <petscerror.h><br><br>    int main() { return 0; }<br><br>It fails because <petscerror.h> expects `MPI_Comm` to be defined, but it is (I assume) lacking appropriate includes which would define it. This is unfortunate, because many linters targeting C/C++ sort header files alphabetically. Since "petsc" is the common prefix for most PETSc header files, `petscerror.h` was put first in my header list because it begins with an "e".<br><br>I'm using PETSc version 3.21.3.<br><br>Thanks in advance<br><span id="cid:B467E48C-610A-4867-91B6-E0F9459915B8"><OpenPGP_0x1A14CB3464CBE5BF.asc></span></div></div></blockquote></div><br></div></body></html>