Also make sure you are linking to the correct .lib file (it should be small, not >100K). It is very easy to link Lua statically by mistake, and this will cause weird crashes at runtime if you then load modules that were linked to the Lua DLL. The opposite can also happen (your app is linked against the Lua DLL, the module links Lua statically), and also leads to pain and crashes, not necessarily in this order. :-)
-- Fabio Mascarenhas 2010/10/21 Ignacio Burgueño <iburgu...@gmail.com>: > If I understood correctly, your script works fine using the standalone > interpreter, but fails to do so when you run it from your application, > right? > The error handling in your C++ seems wrong. > You load your script, pcall it and if there is an error, you call lua_error. > That will invoke your panic function that gets the message and throws a C++ > exception. You're mixing Lua errors and exceptions. Nothing good will come > out of that :D > I think that your Lua script causes a runtime error, and the application > blows up when dealing with it. Probably the require call is failing. > Try this, instead of require "luasql.sqlite3" > do > local ok, err = pcall(require, "luasql.sqlite3") > if not ok then > print(err) > end > Let's see if the error shows up here. Also you can add some printf's in your > code before throwing exceptions to see what's going on. > Regards, > Ignacio > > _______________________________________________ > Kepler-Project mailing list > Kepler-Project@lists.luaforge.net > http://lists.luaforge.net/cgi-bin/mailman/listinfo/kepler-project > http://www.keplerproject.org/ > _______________________________________________ Kepler-Project mailing list Kepler-Project@lists.luaforge.net http://lists.luaforge.net/cgi-bin/mailman/listinfo/kepler-project http://www.keplerproject.org/