Skip to content

make编译报错 #1

Description

@ranning

yyy005@ubuntu-desktop:~/Desktop/Code/find_way/lua-navigation$ make
gcc -g3 -O2 -rdynamic -Wall -fPIC -shared -o navigation.so luabinding.c map.c jps.c fibheap.c smooth.c
luabinding.c: In function ‘getfield’:
luabinding.c:17:9: error: void value not ignored as it ought to be
17 | if (lua_getfield(L, -1, f) != LUA_TNUMBER) {
| ^~~~~~~~~~~~~~~~~~~~~~
luabinding.c: In function ‘lnav_blockset’:
luabinding.c:237:12: warning: implicit declaration of function ‘lua_geti’; did you mean ‘luaL_getn’? [-Wimplicit-function-declaration]
237 | while (lua_geti(L, -1, i) == LUA_TTABLE) {
| ^~~~~~~~
| luaL_getn
luabinding.c: In function ‘lmetatable’:
luabinding.c:482:9: warning: implicit declaration of function ‘luaL_newlib’; did you mean ‘luaL_openlib’? [-Wimplicit-function-declaration]
482 | luaL_newlib(L, l);
| ^~~~~~~~~~~
| luaL_openlib
luabinding.c: In function ‘lnewmap’:
luabinding.c:503:9: error: void value not ignored as it ought to be
503 | if (lua_getfield(L, 1, "obstacle") == LUA_TTABLE) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
luabinding.c: At top level:
luabinding.c:522:11: error: expected ‘;’ before ‘int’
522 | LUAMOD_API int luaopen_navigation_c(lua_State* L) {
| ^~~~
| ;
luabinding.c: In function ‘luaopen_navigation_c’:
luabinding.c:523:5: warning: implicit declaration of function ‘luaL_checkversion’; did you mean ‘luaL_checkoption’? [-Wimplicit-function-declaration]
523 | luaL_checkversion(L);
| ^~~~~~~~~~~~~~~~~
| luaL_checkoption
make: *** [Makefile:11: navigation.so] Error 1

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions