我想安装lua-cjson,运行时出现这个错误luarocks install lua-cjson
Error: Build error: Failed installing cjson.dll
我的 cl 版本是https://imgur.com/a/YiSVqTm
我的 luarocks 版本是:
luarocks 2.0.2
LuaRocks main command-line interface
我不知道如何解决这个问题
这是我luarocks install lua-cjson
在 VS 2019(2) 的开发人员命令提示符中运行时的输出:
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools>luarocks install lua-cjson
Installing http://luarocks.org/repositories/rocks/lua-cjson-2.1.0.6-1.src.rock...
cl /MD /O2 -c -Folua_cjson.obj -IC:/Program Files (x86)/Lua/5.1/include lua_cjson.c -DDISABLE_INVALID_NUMBERS -DUSE_INTERNAL_ISINF
Microsoft (R) C/C++ Optimizing Compiler Version 19.22.27905 for x86
Copyright (C) Microsoft Corporation. All rights reserved.
lua_cjson.c
lua_cjson.c(736): warning C4090: 'function': different 'const' qualifiers
lua_cjson.c(753): warning C4090: 'function': different 'const' qualifiers
lua_cjson.c(1280): warning C4090: 'function': different 'const' qualifiers
lua_cjson.c(1458): warning C4090: 'function': different 'const' qualifiers
lua_cjson.c(1470): warning C4090: 'function': different 'const' qualifiers
lua_cjson.c(1475): warning C4090: 'function': different 'const' qualifiers
lua_cjson.c(1492): warning C4090: 'function': different 'const' qualifiers
lua_cjson.c(1497): warning C4090: 'function': different 'const' qualifiers
lua_cjson.c(1502): warning C4090: 'function': different 'const' qualifiers
cl /MD /O2 -c -Fostrbuf.obj -IC:/Program Files (x86)/Lua/5.1/include strbuf.c -DDISABLE_INVALID_NUMBERS -DUSE_INTERNAL_ISINF
Microsoft (R) C/C++ Optimizing Compiler Version 19.22.27905 for x86
Copyright (C) Microsoft Corporation. All rights reserved.
strbuf.c
cl /MD /O2 -c -Fofpconv.obj -IC:/Program Files (x86)/Lua/5.1/include fpconv.c -DDISABLE_INVALID_NUMBERS -DUSE_INTERNAL_ISINF
Microsoft (R) C/C++ Optimizing Compiler Version 19.22.27905 for x86
Copyright (C) Microsoft Corporation. All rights reserved.
fpconv.c
link -dll -def:cjson.def -out:cjson.dll C:/Program Files (x86)/Lua/5.1/lib/lua5.1.lib lua_cjson.obj strbuf.obj fpconv.obj
Microsoft (R) Incremental Linker Version 14.22.27905.0
Copyright (C) Microsoft Corporation. All rights reserved.
Creating library cjson.lib and object cjson.exp
Error: Build error: Failed installing cjson.dll in C:\Program Files (x86)\Lua\5.1\rocks/lua-cjson/2.1.0.6-1/lib
我希望能够安装 luarocks 但它失败了。