-
Hey, The error is this:
It seems that clang includes I was hoping someone has an Idea, or could point me to some usefull information regarding what bindgen is doing under the hood exactly. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
given that this is a clang error I'd suggest you check whether you're using the same clang version on CI and locally |
Beta Was this translation helpful? Give feedback.
I did what you proposed, but since the order was random, the dumps were hard to compare. So I sorted the headers before adding them via the
header
method. This made the problem go away, in all places, without include guards.My untested assumption is the following: if you add a file via
header
, the#pragma once
is ignored. If you have two files, a.h and b.h, where b.h includes a.h, and you add b.h first, then clang/bindgen will process the contents of a.h indirectly first, and then a second time, when it is a.h's turn. If it's the other way around, the include guard works, when a.h is encountered indirectly while processing b.h. This also makes sense because the header list is generated f…