Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Koneki » LDT with an external library (winapi.dll)
LDT with an external library (winapi.dll) [message #1416989] Sun, 20 October 2013 14:20 Go to next message
Kirk Tierney is currently offline Kirk TierneyFriend
Messages: 2
Registered: October 2013
Junior Member
Hello, Forum.

I am much enamoured of the Lua language implementation in interacting with C/C++. But in simulating my hardware, I wanted to use Koneki LDT with Steve Donovan's WinAPI library-- winapi.dll. Not much success.

When I use the stand-alone Lua interpreter, this library needed only the following:

a) Put Donovan's winapi.dll in the code path for the interpreter.

b) Simplest Lua code example:


require 'winapi'

for i = 1, 10 do
print(os.clock())
winapi.sleep(100)
end


This does not work for me in Koneki LDT. I have read the forums, looking for equivalent issues, and (maybe) I see similar ones out there, but always confusing.

I ask for a bit of simple guidance:

(i) Is there a direct way to use this kind of library in LDT?

(ii) If not, is there an indirect way?

(iii) If there is either a direct or indirect way, can someone here please point me to it?

Thanks,

KT
Re: LDT with an external library (winapi.dll) [message #1416990 is a reply to message #1416989] Mon, 21 October 2013 16:54 Go to previous message
Simon Bernard is currently offline Simon BernardFriend
Messages: 345
Registered: July 2009
Senior Member
hi,

You could do this with LDT.
The default lua interpreter shipped in LDT and base on JNLua should be able to manage this use case. But the common mistake is to use the interpreter compiled in 64 bit and use a 32 bits libraries. If you have a 64 version of eclipse, you have the JNLua interpreter compiled in 64 bit too.

To avoid any problems of this kind, you can register in LDT your stand alone lua interpreter which works with your lib, then use it to launch your code (don't forget to set your LUA_PATH and LUA_CPATH correctly)
You could have more documentation here : http://wiki.eclipse.org/Koneki/LDT/Developer_Area/User_Guides/User_Guide_1.0#Managing_Interpreters

HTH :)

Simon
Previous Topic:Debugging issue with standalone interpreter
Next Topic:Debugging issue with standalone interpreter
Goto Forum:
  


Current Time: Fri Apr 26 10:44:25 GMT 2024

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

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

Back to the top