Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » 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

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 :


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/'
no file '/usr/local/lib/lua/5.1/loop/'
no file '/usr/lib/lua/5.1/loop/'
no file '/usr/local/lib/lua/5.1/'
no file './'
no file '/usr/local/lib/lua/5.1/'
no file '/usr/lib/lua/5.1/'
no file '/usr/local/lib/lua/5.1/'
at com.naef.jnlua.LuaState.lua_pcall(Native Method)

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

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.

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

Current Time: Fri Jun 24 23:54:06 GMT 2022

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

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

Back to the top