I have installed the IUP ( graphic toolkit ) in a given folder. When I run the following script from within this folder, it works perfectly ..
require("iuplua")
iup.Message('Minha Aplicação','Finalizada com sucesso!')
The iuplua.so file is a shortcut that points to /usr/lib/libiuplua52.so . This file exists in the installation directory and there is a copy at /usr/lib/lua/5.2/iuplua.so
The problem happens when I exit this directory and try to run the same application, I get this error message:
lua: error loading module 'iuplua' from file './iuplua.lua':
./iuplua.lua:142: too many C levels (limit is 200) in main function near '"Toggle Text"'
stack traceback:
[C]: in ?
[C]: in function 'require'
./iuplua.lua:1: in main chunk
[C]: in function 'require'
./iuplua.lua:1: in main chunk
[C]: in function 'require'
./iuplua.lua:1: in main chunk
[C]: in function 'require'
./iuplua.lua:1: in main chunk
[C]: in function 'require'
...
If I check the search path inside the Lua interpreter:
> print (package.cpath)
/usr/local/lib/lua/5.2/?.so;/usr/lib/i386-linux-gnu/lua/5.2/?.so;/usr/lib/lua/5.2/?.so;/usr/local/lib/lua/5.2/loadall.so;./?.so
I'm not very experienced in GNU-Linux, but it seems to me a problem in the search path ... the so-called LUA_PATH ... is that right? Does anyone know how to solve this?