my aim is to install cjson with luarocks on Windows 10 (64 Bit), what i've done so far:
Try the installation via make:
- put this luajit installation on the path "C:\torch" and set all the following path variables manually (see issues)
- Path = "C:\torch\bin;"%PATH%
- LUA_CPATH="C:\torch\bin\?.dll;;"
- LUA_DEV="C:\torch;"
- LUA_PATH="C:\torch\lua\?;C:\torch\lua\?.lua;C:\torch\lua\?\init.lua;;"
- put this version of lua-cjson-2.1.0 on the following folder: "C:\Users\username\Desktop\lua-cjson-2.1.0"
- install mingw with make version 3.81, cmake 3.13.2 and add "C:\MinGW\msys\1.0\bin\" and "C:\Program Files\CMake\bin\" to the Path variable
- uncomment variables for Windows(MingGW) and setting the PREFIX = C:\torch\ in the Makefile of lua-cjson-2.1.0
- go via admin-shell to "C:\Users\username\Desktop\lua-cjson-2.1.0"
- "make install" yields the following output:
cc -c -O3 -Wall -pedantic -DNDEBUG -IC:\torch CJSON_CFLAGS = -DDISABLE_INVALID_NUMBERS/include -fpic -o lua_cjson.o lua_cjson.c
make: cc: Command not found
make: *** [lua_cjson.o] Error 127`
Another try with luarocks doesn´t work too:
- call ""C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64"
- then call "luarocks make" as described in the cjson-manual
- this yields the following output:
cl /nologo /MD /O2 -c -Folua_cjson.obj -IC:/torch/include lua_cjson.c -DDISABLE_INVALID_NUMBERS lua_cjson.c
cl /nologo /MD /O2 -c -Fostrbuf.obj -IC:/torch/include strbuf.c -DDISABLE_INVALID_NUMBERS strbuf.c
strbuf.c(98): warning C4311: "type conversion": pointer truncation from "strbuf_t *" to "long"
strbuf.c(172): warning C4311: "type conversion": pointer truncation from "strbuf_t *" to"long"
cl /nologo /MD /O2 -c -Fofpconv.obj -IC:/torch/include fpconv.c -DDISABLE_INVALID_NUMBERS fpconv.c
link -dll -def:cjson.def -out:cjson.dll C:/torch/lib/libluajit.lib lua_cjson.obj strbuf.obj fpconv.obj
Microsoft (R) Incremental Linker Version 14.10.25019.0
Copyright (C) Microsoft Corporation. All rights reserved.
Bibliothek "cjson.lib" und Objekt "cjson.exp" werden erstellt.
lua_cjson.obj : error LNK2019: Reference to unresolved external symbol "strncasecmp" in function "json_is_invalid_number".
cjson.dll : fatal error LNK1120: 1 nicht aufgelöste Externe
Error: Build error: Failed compiling module cjson.dll`
Whats wrong with the installation procedure?