lunarmodules / luasql

LuaSQL is a simple interface from Lua to a DBMS.
http://lunarmodules.github.io/luasql
535 stars 192 forks source link

Attempting to install LuaSQL MySQL results in "cl is not recognized as an internal or external command" #86

Closed mccrafter1212 closed 6 years ago

mccrafter1212 commented 6 years ago

I've never heard of "cl" although clearly I don't have it. When attempting to install luasql-mysql I do: ./luarocks install luasql-mysql MYSQL_DIR="C:/Program Files/MySQL/MySQL Server 5.7" I then get this: error Obviously there's an error there with "cl" not being recognized. So how can I fix this?

kcousins commented 6 years ago

cl.exe is Microsoft's C and C++ compiler. To get any further:

mccrafter1212 commented 6 years ago

@kcousins Thanks for responding. I do have Visual Studio installed (2017 & 2015) so I'm not sure why I'm getting this issue... How can I correctly configure this?

mccrafter1212 commented 6 years ago

Okay, so I seem to have actually fixed my issue although ran into a new one. I'll close this issue and post a new one.

Fix to this issue: Use Developer Command Prompt for VS2015 (or other year / version) when running the installation command. You're going to need to do cd .. assuming your current path is C:\Program Files (x86)\Microsoft Visual Studio and then do cd LuaRocks to access the LuaRocks directory. Once there just run your installation command and everything should work fine.