Visual Studio 2008 C++ & Lua Problems

Started by
0 comments, last by reptor 14 years, 10 months ago
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
Advertisement
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.

This topic is closed to new replies.

Advertisement