Sign in to follow this  
ScottH87

Visual Studio 2008 C++ & Lua Problems

Recommended Posts

Hi, I'm very new to Lua programming and I'm planning on using it in a graphics application soon so i thought I should get to know it first. However I've hit a very early stumbling block. I've been working from this tutorial to try and get a hello world program to work:- http://www.codeproject.com/KB/cpp/luaincpp.aspx I've just copied and pasted the code given here into a new project and set it up how I thought it should be done. The code compiles with no errors but when i run it the console window displays "PANIC! unprotected error in call to Lua API (no calling environment)" After debugging I've found that this happens when the io library is loaded. Can anyone see why this might be? Here are the project settings:- C/C++ -> Additional Include Directories -> "C:\Program Files (x86)\Lua\5.1\include" Linker -> Additional Library Directories -> "C:\Program Files (x86)\Lua\5.1\lib" Linker -> Additional Dependicies -> lua5.1.lib

Share this post


Link to post
Share on other sites
Are you sure that your copy of Lua is compatible with the tutorial you are using?

Did you read the comments at that CodeProject page? There is at least one comment pointing out an incompatibility, that code should be different for it to work on a different version.

I am using Lua and tolua++ with Visual C++ 2008 without problems. I have not used the same tutorial.

Share this post


Link to post
Share on other sites

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