Lua-cURL / Lua-cURLv3

Lua binding to libcurl
MIT License
279 stars 64 forks source link

How do I install Lua-cURL? #183

Closed L3G5ND closed 1 year ago

L3G5ND commented 2 years ago

I've been trying to figure out how to install Lua-cURL, but haven't been able to.

Compiler: mingw32 Lua: lua5.1 Luarocks: Luarocks 3.8.0

When I use the command luarocks install Lua-cURL I get

Installing https://luarocks.org/dev/lua-curl-scm-0.rockspec

Error: Could not find header file for CURL
  No file curl/curl.h in c:/external/include
  No file curl/curl.h in c:/mingw/include
  No file curl/curl.h in c:/windows/system32/include
You may have to install CURL in your system and/or pass CURL_DIR or CURL_INCDIR to the luarocks command.
Example: luarocks install lua-curl CURL_DIR=/usr/local

Please help, its stressing me out, I just want It to be installed already.

moteus commented 2 years ago

I think you can download libcrul binary from official web site https://curl.se/windows/ Then point CURL_DIR to this folder

L3G5ND commented 2 years ago

Thanks, I get this error when I require it though.

C:\Lua51\lua5.1.exe: error loading module 'lcurl' from file 'C:\Lua51\systree\lib\lua\5.1\lcurl.dll':
        The specified module could not be found.

stack traceback:
        [C]: ?
        [C]: in function 'require'
        C:\Lua51\systree\share\lua\5.1\cURL.lua:11: in main chunk
        [C]: in function 'require'
        Main.lua:1: in main chunk
        [C]: ?

Seems like when I installed it, it didn't install a lcurl file.