Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Lua Development Tools » External Lib : Lua LOOP not running(integrating external lib and LDT)
External Lib : Lua LOOP not running [message #988928] Mon, 03 December 2012 20:04 Go to next message
Eclipse UserFriend
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 10:50 Go to previous message
Kevin KIN-FOO is currently offline Kevin KIN-FOOFriend
Messages: 58
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: Tue Apr 16 23:28:35 GMT 2024

Powered by FUDForum. Page generated in 0.23914 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top