Thank You Javier, Your tips helped me overcome my error.
Regards
Santosh
Message: 2Date: Wed, 10 Dec 2014 08:57:51 -0500From: Javier Guerra Giraldez <javier@guerrag.com>Subject: Re: Lua C program return value...To: Lua mailing list <lua-l@lists.lua.org>Message-ID: <CAFkDaoQpKgpvaftL4u2sHkoKdRf9pFZbFvtsD0FOOdnTPw2yXg@mail.gmail.com" style="font-size:13px">
CAFkDaoQpKgpvaftL4u2sHkoKdRf9pFZbFvtsD0FOOdnTPw2yXg@mail.gmail.com>Content-Type: text/plain; charset=UTF-8On Wed, Dec 10, 2014 at 8:52 AM, Santosh Kadam <sanmanik@gmail.com> wrote:> What I have observed is that if I don't call openlibs - I don't get the> value returned to the LUA function. From the debug logs (lua asserts) - I> can see that an error is printed like this "An attempt to print (nil)> value."is that the exact error message? i think it should be "attempt tocall global 'print' (a nil value)", which means that 'print' isn'tdefined, as should be expected if you haven't loaded the standardlibrary by skipping luaL_openlibs(L)in short: no, it's not mandatory to call luaL_openlibs; but if youdon't then you don't get any default function, like print()--Javier