lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

James Hearon wrote:
New to Lua. I'm stumped on embedded c++ and using require from the .lua file. For ex. require "mylib" with pure Lua works fine, but when I try to run the .lua file from c++, ex. luaL_dofile(L, "myfile.lua"), after compiling and trying to run, the app just exits.

Without require in the .lua, I can run .lua from c++ no problem. I'm confused about what may be the problem. I've checked paths, links, includes, environment vars etc.
int status;
status = luaL_loadfile(L, "myfile.lua") does not give an error.
Lua 5.1.4, Linux, g++.

Not sure where to look next.

Any advice how to troubleshoot appreciated.

Yeah, Lua used to be simple to embed and use along its libraries... Now it needs things such as search paths to find the libraries. Oh wait, my execution platform doesn't even have a file system!

Hotmail: Powerful Free email with security by Microsoft. Get it now. <>