Redefinition errors [Was "LuaJIT Wiki?"]

  • From: Daurnimator <quae@xxxxxxxxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Thu, 10 May 2012 07:34:44 +1000

On 8 May 2012 22:41, Cosmin Apreutesei <cosmin.apreutesei@xxxxxxxxx> wrote:
> On Tue, May 8, 2012 at 2:55 PM, Daurnimator <quae@xxxxxxxxxxxxxxx> wrote:
>> I think one of the most pervasive problems with using FFI bindings is
>> a lack of namespacing;
>> whenever I use more than a single FFI based binding in a project I
>> find that I get re-definition errors...
>
> How do you get by this problem in C ?
>

C code gets past the problem with #ifndef commands ==> this works, as
there is only a single preprocessor pass.

If two seperate FFI bindings include the same header, there is no
collaboration to retain defines.
And if we go the "all headers are distributed preprocessed/cleaned"
route; we may not be able to fix that up at all.

Other related posts: