Jump to content
  • Advertisement
Sign in to follow this  
ScottH87

Visual Studio 2008 C++ & Lua Problems

This topic is 3455 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

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
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!