简体   繁体   中英

How do I install OpenGL for Lua using luarocks?

I want to write a 3d rendering system in Lua, but it's proven painfully difficult to install the moongl library (or any OpenGL binding for Lua) using luarocks.

It seems like very few people use Lua based off the lack of information/tutorials on Google, so if anyone could tell me what I'm doing wrong it would be greatly appreciated.

Before, luarocks was telling me that it couldn't find OpenGL and therefore couldn't install moongl, but now it says that LUA_INCDIR and LUA_LIBDIR aren't found. It's telling me what command I need to use to set the path to those things, but I can't do that because I don't even know LUA_INCDIR or LUA_LIBDIR are.

What are LUA_INCDIR and LUA_LIBDIR? Can anyone please explain what I need to do, or if there's an easier way to do this?

LUA_INCDIR is the include directory for Lua (source code) LUA_LIBDIR is the compiled library for Lua.

What you'll need to do is download the source code and compile it .
After that, set both of the environment variables LUA_INCDIR & LUA_LIBDIR to the correct locations (src directory and the build directory)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM