问题
I'm pretty new to using things like luarocks to install libraries, and I'm running into a problem I'm not sure how to fix when installing the dependencies for Lapis.
As you can see, I have none of the dependencies installed for Lapis (I assume that they'll automatically install when I attempt to download Lapis). I'm using the regular command prompt for this. Being so new, I imagine I could be doing many things wrong. Should I be using something else? Any pointers would be great, thanks!
回答1:
Getting this message:
'cl' is not recognized as an internal or external command,
operable program or batch file.
means that you don't have a C compiler in your executables search path (PATH
environment variable). In particular, LuaRocks is searching from cl
, which is the C compiler from Microsoft Visual Studio. If you have Visual Studio installed, you should launch its "x86 Development Command Prompt", and then the directory where cl.exe
is will be set in your PATH
and LuaRocks will find it.
Using Visual Studio is the default configuration for LuaRocks on Windows, but you can also using with MingW. The easiest way to set this up is to use INSTALL /MW
when installing LuaRocks.
In any case, I'm not sure if Lapis is compatible with Windows — you should check that in its documentation!
来源:https://stackoverflow.com/questions/28913395/luarocks-failed-to-compile-object