lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hello Barry,

By default, LDT ships with a built-in Lua VM (based on jnLua) so as anyone without even having to install Lua on its machine can start running Lua scripts real quick. I think that the way you've set the PATH and CPATH, the jnLua VM itself is not found anymore. 

What you probably want is to configure a "local interpreter" for your local native VM. You can use [1] as a reference. Once you have the interpreter set up, you can launch the script against this interpreter instead of the embedded jnLua one by tweaking your launch configuration.

Hope this helps,
Benjamin-- 



De : Barry Camel <bjrcamel@gmail.com>
R�ndre �bsp;: Lua mailing list <lua-l@lists.lua.org>
Date : samedi 7 septembre 2013 13:19
�nbsp;: "lua-l@lists.lua.org" <lua-l@lists.lua.org>
Objet : Getting started with lua in eclipse (LDT)

Hello, apologies for the newbie question:

I am trying to get started with programming in lua using the Eclipse LDT Plugin.

So far I have:

installed the plugin:

Lua Development Tools 1.0.0.201306101641org.eclipse.koneki.ldt.feature.groupEclipse Koneki

installed lua-socket from the fedora repo:

[root@localhost lib]# yum list installed | grep "^lua"
lua.i686                             5.1.4-11.fc18                     @fedora  
lua.x86_64                           5.1.4-11.fc18                     @fedora  
lua-copas.noarch                     1.1.6-4.fc18                      @fedora  
lua-coxpcall.noarch                  1.13.0-4.fc18                     @fedora  
lua-socket.x86_64                    2.0.2-8.fc18                      @fedora


On the run configuration I have set the environment variables:
LUA_CPATH=/usr/lib64/lua/5.1/?.so;?.so
LUA_PATH=/usr/share/lua/5.1/?.lua;?.lua

Now when I try to run a simple "socket" main.lua:

socket = require'socket'
print(socket._VERSION)

I get:

Exception in thread "main" com.naef.jnlua.LuaRuntimeException: error loading module 'socket.core' from file '/usr/lib64/lua/5.1/socket/core.so':
/usr/lib64/lua/5.1/socket/core.so: undefined symbol: lua_gettop
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.JNLua51Launcher.run(JNLua51Launcher.java:122)
at org.eclipse.koneki.ldt.support.lua51.internal.interpreter.JNLua51Launcher.main(JNLua51Launcher.java:137)

Any ideas what is going wrong ?

Thanks.

Baz.