如何修复“错误:生成错误:无法安装cjson.dll”

时间:2019-09-01 04:27:53

标签: lua luarocks cjson

我想安装lua-cjson,运行luarocks install lua-cjson

时出现此错误
Error: Build error: Failed installing cjson.dll

我的cl版本是https://imgur.com/a/YiSVqTm

我的羽绒服版本是:

luarocks 2.0.2
LuaRocks main command-line interface

我不知道该如何解决

这是我在VS 2019(2)的Developer Command Prompt中运行luarocks install lua-cjson时的输出:

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

我希望能够安装羽绒被,但失败。

0 个答案:

没有答案