Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Koneki » External Lib : Lua LOOP not running(integrating external lib and LDT)
External Lib : Lua LOOP not running [message #988928] Mon, 03 December 2012 15:04 Go to next message
Thomas Winkler is currently offline Thomas Winkler
Messages: 22
Registered: July 2009
Junior Member
Hello,


I am new to LDT ( using version 0.9) under Debian Linux and I like it so far.
I can run Lua files within the LDT and it shows the output in the console.

However, if I use external libraries, errors will appear when trying to run them.

For example I tried to use the LOOP library :

local oo = require "loop.base"



I installed LOOP via LuaRocks and I can run classes based on LOOP without any problems on the Linux Shell.

However, running it in Linux will cause the following error message :

Quote:

Exception in thread "main" com.naef.jnlua.LuaRuntimeException: /home/dev/lua/src/main.lua:1: module 'loop.base' not found:
no field package.preload['loop.base']
no file '/home/dev/lua/src/loop/base.lua'
no file '/home/dev/lua/src/loop/base/init.lua'
no file '/home/dev/lua/src/loop/base.luac'
no file '/home/dev/lua/src/loop/base/init.luac'
no file './loop/base.so'
no file '/usr/local/lib/lua/5.1/loop/base.so'
no file '/usr/lib/lua/5.1/loop/base.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
no file './loop.so'
no file '/usr/local/lib/lua/5.1/loop.so'
no file '/usr/lib/lua/5.1/loop.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
at com.naef.jnlua.LuaState.lua_pcall(Native Method)
at com.naef.jnlua.LuaState.call(LuaState.java:555)
at org.eclipse.koneki.ldt.support.lua51.internal.interpreter.JNLuaLauncher.run(JNLuaLauncher.java:122)
at org.eclipse.koneki.ldt.support.lua51.internal.interpreter.JNLuaLauncher.main(JNLuaLauncher.java:137)




How can I fix it so that I can use LDT for LOOP-based lua files, too.


Re: External Lib : Lua LOOP not running [message #989024 is a reply to message #988928] Tue, 04 December 2012 05:50 Go to previous message
Kevin KIN-FOO is currently offline Kevin KIN-FOO
Messages: 48
Registered: January 2010
Member
Hi,

It sounds like there is a difference between the $LUA_PATH available from your terminal and the one available from where you run Koneki LDT.
Do you modify your $LUA_PATH in your .bashrc?
You can check this easily by running the following from shell and from a Koneki LDT project.
print( package.path )

If outputs differ, Koneki LDT and shell do not use same $LUA_PATH.
I think you might either uniform your $LUA_PATH or use the Lua interpreter of your system.

Kevin
Previous Topic:How to Document Module's Local Function
Next Topic:LDT debugging the LÖVE framework
Goto Forum:
  


Current Time: Fri Aug 01 22:46:55 EDT 2014

Powered by FUDForum. Page generated in 0.01591 seconds