Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Koneki » [LDT1.0] link a dynamic library , Help !
[LDT1.0] link a dynamic library , Help ! [message #1083901] Sat, 10 August 2013 13:52 Go to next message
林 焰 is currently offline 林 焰
Messages: 1
Registered: August 2013
Junior Member
I installed Lua for windows & iup module , and test iup::dialog success.
I tested this code in LDT , but only red word printed in console

Then I use LDT 1.0 , how to config and expand embedded Lua Execution Envirment ,
making it support more rocks or module

[the tips]
Exception in thread "main" com.naef.jnlua.LuaRuntimeException: G:\__proj\lua\lua5.1\src\main.lua:6: module 'iuplua' not found:
no field package.preload['iuplua']
no file 'E:\Lib\Lua51\'
no file '.\iuplua.dll'
no file '.\iuplua51.dll'
no file 'E:\Lib\java\jdk1.7.0_21\jre\bin\iuplua.dll'
no file 'E:\Lib\java\jdk1.7.0_21\jre\bin\iuplua51.dll'
no file 'E:\Lib\java\jdk1.7.0_21\jre\bin\clibs\iuplua.dll'
no file 'E:\Lib\java\jdk1.7.0_21\jre\bin\clibs\iuplua51.dll'
no file 'E:\Lib\java\jdk1.7.0_21\jre\bin\loadall.dll'
no file 'E:\Lib\java\jdk1.7.0_21\jre\bin\clibs\loadall.dll'
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)

[the Example ]

-- Example 37 -- External Libraries.
-- Lua has support for external modules using the 'require' function
-- INFO: A dialog will popup but it could get hidden behind the console.

require( "iuplua" )
ml = iup.multiline
{
expand="YES",
value="Quit this multiline edit app to continue Tutorial!",
border="YES"
}
dlg = iup.dialog{ml ; title="IupMultiline" , size="QUARTERxQUARTER" ,}
dlg:show()
print( "Exit GUI app to continue!")
iup.MainLoop()


-------- Output ------

--Exit GUI app to continue!

--Press 'Enter' key for next example
Re: [LDT1.0] link a dynamic library , Help ! [message #1085193 is a reply to message #1083901] Mon, 12 August 2013 11:26 Go to previous message
Marc Aubry is currently offline Marc Aubry
Messages: 74
Registered: August 2012
Member
Hi,

It seams that the module "iuplua" can't be found when you require the module "iuplua".
You have to add the path to the module to the LUA_PATH environment variable.

See the documentation of the require here :
http://www.lua.org/pil/8.1.html

You can modify your system LUA_PATH environment variable, but you must restart LDT to make the change effective.
You can also modify the LUA_PATH environment variable by editing the interpreter you use, see:
http://wiki.eclipse.org/Koneki/LDT/Developer_Area/User_Guides/User_Guide_1.0#Local_Interpreters
Or in the Launch Configuration you use, see the "Environment" tab :
http://wiki.eclipse.org/Koneki/LDT/Developer_Area/User_Guides/User_Guide_1.0#Local_session


Previous Topic:Koneki LDT 1.0 (on Windows): Debugging not working
Next Topic:LuaSocket
Goto Forum:
  


Current Time: Tue Jul 29 17:11:44 EDT 2014

Powered by FUDForum. Page generated in 0.01801 seconds