lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On 12/19/16 5:41 PM, Geoff Leyland wrote:

I'm trying to install lua-cjson on Windows with Luarocks (2.4.2, freshly installed).

cl is:

cl /?
Microsoft (R) C/C++ Optimizing Compiler Version 16.00.30319.01 for x64
Copyright (C) Microsoft Corporation.  All rights reserved.

When I try to install, I get:

luarocks install lua-cjson
The specified configuration type is missing.  The tools for the
configuration might not be installed.
cl /nologo /MD /O2 -c -Folua_cjson.obj -IC:/Users/Geoff Leyland/lua/include lua_cjson.c -DDISABLE_INVALID_NUMBERS
c:\users\geoff leyland\appdata\local\temp\luarocks_lua-cjson-2.1.0-1-8654\lua-cjson-2.1.0\strbuf.h(78) : error C2054: expected '(' to follow 'inline'
c:\users\geoff leyland\appdata\local\temp\luarocks_lua-cjson-2.1.0-1-8654\lua-cjson-2.1.0\strbuf.h(79) : error C2085: 'strbuf_reset' : not in formal parameter list
c:\users\geoff leyland\appdata\local\temp\luarocks_lua-cjson-2.1.0-1-8654\lua-cjson-2.1.0\strbuf.h(79) : error C2143: syntax error : missing ';' before '{'

It doesn't look like there's anything wrong with strbuf.h.  The "offending" line is:

static inline void strbuf_reset(strbuf_t *s)

which I would have thought was ok.  (The preceding lines look ok too, and anyway this installs fine on *nix).

Am I making any obvious mistakes?

Have you tried installing the master branch? I wouldn't know for sure but it seems like it received a few fixes for Windows installs since 2.1.0:

Additionally, you might want to check out the openresty/lua-cjson maintained fork which contains a few bugfixes and additional features:

Both of those options are not published on Luarocks but you can clone either repository and try to install their master branch with:
    $ git clone <mpx/lua-cjson or openresty/lua-cjson>
    $ cd lua-cjson
    $ luarocks make

-- Thibault