Sign in to follow this  

How to get Lua 5.1.2 to work

This topic is 3829 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm not having any luck getting the new Lua release to compile in MSVC 8.0. I downloaded the lua5_1_2_Win32_vc8_lib.zip from the lua site and set up my include/lib directories to find them. Do I need to compile Lua myself from the source code (and where do I find information about that?)? One of the errors I'm getting is MSVCR80.dll not found. I tried finding the file on my computer and copying it into the same directory but then I get another error saying it's trying to access it incorrectly. Also, I have an old lua project that I had working that needed to link to lualib.lib but in the new version of Lua this file is missing (lualib.h is there but no .lib is included). Now my call to luaopen_io() breaks immediately. I guess what I'm asking is can someone point me to the information to get lua 5.1.2 working without any fancy things like luabind or Lua++?? Please help, I want to love lua but right now I hate it. [Edited by - shadowDragon on June 1, 2007 2:01:46 PM]

Share this post


Link to post
Share on other sites
LuaBinaries is where I get my source from, you can either get pre-compiled OR the source download and build it yourself.

If you do go the source route be adviced of two things;
- Firstly, dependancies aren't setup between the various projects so you'll have to build twice
- Secondly, the Lua compiler exe needs to statically link with the lua lib, to do this you'll need to change the linker path to read "../lib/static;../lib"

Other than that, it should work fine from there [smile]

Share this post


Link to post
Share on other sites
I know that MSVCR80.dll error, it doesn't have anything to do with Lua, it's more to do with how MSVC is set up.

I don't remember the exact fix, but try this. Go to project settings -> C/C++ -> Code Generation, and change "Runtime Library" to "Multi-threaded" instead of "Multi-threaded DLL". For your debug configuration, use "Multi-threaded Debug".

If you were going to copy over the runtime DLLs, you also need to copy the .manifest file (and if you are using the Express Edition, you might have to hand-write the manifest file). That's why it complained about you accessing the file incorrectly. But hopefully my first suggestion will let you avoid messing around with DLLs and manifests.

Share this post


Link to post
Share on other sites
Hey shadowDragon:
Got the libs running by compiling my own from source. Used the command prompt in VS2K5 and fiddled with what file I had to use in the source folder. Never thought I'd get passed those linker warnings with the old libs. :)

Thanks again Dave. Don't forget: graduation on the 25th of July. Seth and I will see you there.

Peace.

Share this post


Link to post
Share on other sites

This topic is 3829 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this