Lua with Visual Studio

Started by
4 comments, last by Simian Man 18 years, 11 months ago
I just downloaded an open source project that uses Lua and I can't get it to compile because I don't have Lua set up on my computer. I tried checking lua.org and google but neither one was much help. I'm trying to compile the project using Visual Studio.NET. Can anybody here help me get Lua set up properly? If it helps, the error message that I get is "Cannot open include file: 'lauxlib.h'".
Advertisement
soz m8 cant help i tried using an open sorce LUA once i got nowhere try and find a LUA sdk
------------------------------------------------------------GDSFUBY GameDev Society For UnBanning YodaTheCodaIf you want to see yoda unbanned then put this in your sig------------------------------------------------------------
I'm sorry but that's nothing to do with VS or LUA, you just haven't got your paths set up properly so that the project can find the appropriate headers (or you just don't have them)
-Scoot
When I dl Lua, do I need to actually compile it, or do I just need to set my paths correctly to include the Lua files?
I'm not sure if you're using C#/.NET, but here's what I have done with C++ (although I'm using Dev-C++, I do also have the commandline MSVC 2003 .NET, so I know that it's the same).

Downloaded luaxlib.h, lua.h, lualib.h and placed them in the include folder.
Downloaded lua-5.0.lib and lualib-5.0.lib and placed them in the lib folder.
Downloaded lua-5.0.dll and lualib-5.0.dll plus lua.exe and luac.exe (for compilation to bytecode for faster loading) and placed them in the C:\WINDOWS directory (any directory included in the enviroment paths will do fine, like C:\WINDOWS\system32), but you also need to include them with your program if you distribute it since the end users probably don't have it.

After that, Lua worked perfectly, and I haven't had any problems with the paths (yet :-P).

Your error "cannot open include file: 'lauxlib.h'" sounds like you're not placing the files correctly in the include folder (you cannot placed them in a subfolder and then use #include <lua.h> unless the path is predefined in the project options).
Killers don't end up in jailThey end up on a high-score!
You will need to either compile it, or get Lua Binaries

Good Luck!

This topic is closed to new replies.

Advertisement