C++11
When statically included within C++11 projects, the library isn't compiled.
The errors are:
.../luasandbox/include/lrexlib-2.6.0/src/pcre/../algo.h:125:27: warning: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wliteral-suffix] luaL_typerror(L, pos, "string or "REX_TYPENAME);
and
.../luasandbox/include/lrexlib-2.6.0/src/pcre/lpcre.c:180:20: error: invalid conversion from ‘void_’ to ‘const unsigned char_’ [-fpermissive] argC->tables = *check_chartables (L, pos);
There may be other errors.
Thanks for the report; can you try again with up-to-date sources? Also, I'm a little confused: lrexlib is C, not C++.
This is the problem: lrexlib's C is not up to C++'s standards, therefore it cannot be compiled statically into projects in C++.
Lua is written in the intersection of C and C++. lrexlib, like most Lua libraries, is written in plain C. You can use it statically (or dynamically!) in a C++ project just as you would any other C++: using extern "C".
Compiling lrexlib (or any other Lua C library that calls other C libraries) as C++ would require considerable work, because then the bindings to the C libraries (libc, oniguruma, TRE &c.) would need to have both C++ and C versions. It does sound like an interesting project to try to find a general solution; feel free to propose patches.
@alex-mashin I've fixed some minor issues. Could you please try again?