lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

In a project I'm writing I want to ensure my C code doesn't use
newfangled features, so I compile it with `-ansi` (or `-std=c90`). I'm
using gcc.

However, in this mode the compiler emits an error:

    error: #error "Compiler does not support 'long long'. Use option
    or '-DLUA_C89_NUMBERS' (see file 'luaconf.h' for details)"

What should I do?

The Lua library on my system ( is precompiled with 64
bits integers. I don't want to ship Lua together with my project. So I
want Lua's header files to define integers as 64 bits (to match the
installed Lua library). But if I add '-DLUA_32BITS' or
'-DLUA_C89_NUMBERS' to my CFLAGS, as the error message advises,
there'd be a mismatch between the Lua headers and my system's