Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xlua macos luajit 编译报错 #111

Open
owllyi opened this issue Feb 1, 2023 · 0 comments
Open

xlua macos luajit 编译报错 #111

owllyi opened this issue Feb 1, 2023 · 0 comments

Comments

@owllyi
Copy link

owllyi commented Feb 1, 2023

一开始其他平台编译luajit报错lua_tointegerx 的static定义有问题,注释掉这段之后继续
#if LUA_VERSION_NUM < 502
/* static int64_t lua_tointegerx(lua_State *L, int idx, int *isnum) {
if (lua_isnumber(L, idx)) {
if (isnum) *isnum = 1;
return (int64_t)lua_tointeger(L, idx);
}
else {
if (isnum) *isnum = 0;
return 0;
}
} */

到后面又有报错,提示lua_tointegerx定义不清晰,看了下,macos下编译luajit,用的是lua5.1的代码,就会有问题
/Users/runner/work/xLua/xLua/build/sproto/lsproto.c:295:8: error: implicit declaration of function 'lua_tointegerx' is invalid in C99 [-Werror,-Wimplicit-function-declaration]

想问下这里应该如何兼容各种情况呢?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant