Reputation: 2018
I am started to learn Lua few days ago and faced next problem. How can I run the whole lua script form C program, for example, I have a lua script and read it like a text file in my C program so how can I run this script from C side?
Upvotes: 0
Views: 393
Reputation: 9559
By using luaL_dofile. even no need to read the text file in separately.
In Programming in Lua, they do it using luaL_loadfile (to allow for some more flexibility)
Upvotes: 4