2
I installed the IUP (Toolkit graphic) in a given folder. When I run the following script from within that 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 in /usr/lib/lua/5.2/iuplua.so
The problem happens when I leave 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? Someone knows how to fix this?
If I’m not mistaken, now that it’s been a few days you can mark your own answer as you accept.
– hugomg