Open helloworldguy4 opened 6 years ago
Just tested. All works with MSVC 2010 on Windows 7.
Did you run this command from Visual Studio Command Prompt
?
No I run this command from the normal cmd because I have installed luarocks there
But I also have linux subsystem on my windows. So I can use bash. And if im installing it there it works. But unfornately I can still not use lfs somehow then if im requiring it.
Again. Try run luarocks install luafilesystem
from correct Visual Studio Command Prompt
Go to your visual studio installation and there should be a vcvarsall bat file. CMD there and do vcvarsall x86 (assuming you're 32 bit). type cl in console and check if it works.
The easiest fix is that this is a documentation bug.
The installation instructions for windows need to state that you need to:
Visual Studio Command Prompt
to run luarocks install luafilesystem
.I'm guessing that once compilation is complete you can just use luafilesystem directly? If not the luarock is broken on windows, as it is no longer self contained.
The right fix would be to use autotools to find the most appropriate C compiler and libraries.
eg. for windows (with the aid of chocolatey), you can:
PS > choco install mingw
... lots of stuff here ...
PS > choco install make
... more stuff here ...
PS > cat hello.c
#include <stdio.h>
int main() {
printf("Hello, World!\n\r");
return 0;
}
PS > make hello CC=gcc
gcc hello.c -o hello
PS > ./hello
Hello, World!
presuming you're presenting only the standard C filesystem APIs to lua, if you build using mingw, you can pretend windows doesn't exist, and throw away all of the windows-specific build stuff.
@hishamhm can we close this? enough solutions presented...
Hi Team, I am still with the same issue
@venkateshveeroju what's the exact error you're getting?
Hello, Im getting the very same error with LUA 5.3 and MinGW compiler.
PS C:\Users\Pc> luarocks install luafilesystem
Installing https://luarocks.org/luafilesystem-1.8.0-1.src.rock
luafilesystem 1.8.0-1 depends on lua >= 5.1 (5.3-1 provided by VM)
mingw32-gcc -O2 -c -o src/lfs.o -IC:\Lua\src src/lfs.c
Error: Build error: Failed compiling object src/lfs.o
If im trying to install luafilesystem on Windows 10 with luarocks and lua 5.1 then its not working. Heres the full log: (no matter if im entering it with --local or not, its the same)
C:\Users\LuckyChicken>luarocks install luafilesystem --local Installing https://luarocks.org/luafilesystem-1.7.0-2.src.rock cl /nologo /MD /O2 -c -Fosrc/lfs.obj -IC:/Program Files (x86)/LuaRocks/include src/lfs.c Der Befehl "cl" ist entweder falsch geschrieben oder konnte nicht gefunden werden.
Error: Build error: Failed compiling object src/lfs.obj
(The text "Der Befehl "cl" ist entweder falsch geschrieben oder konnte nicht gefunden werden." is german and means in english: Could not found the command "cl")
I think theres something wrong with the installation. Im on windows and I dont have the command "cl"
What can I do?