Luarocks Failed to Compile Object

4k Views Asked by At

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

There are 1 best solutions below

2
On

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!