4

I want to pass a Lua script (code that Lua interpreter can process) from C++ and get the result back.

I looked online but could not find any example that would help me. I am able to call a Lua function from C++, but that requires you to create a file with Lua function.

0

1 Answer 1

6

Try using luaL_dostring, which loads and runs a given string.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.