Skip to main content



      Home
Home » Archived » Lua Development Tools » LDT with an external library (winapi.dll)(How to incorporate a .dll library within LDT.)
icon5.gif  LDT with an external library (winapi.dll) [message #1146940] Sun, 20 October 2013 10:19 Go to next message
Eclipse UserFriend
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 #1148645 is a reply to message #1146940] Mon, 21 October 2013 12:54 Go to previous message
Eclipse UserFriend
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 Smile

Simon
Previous Topic:Debugging issue with Lua standalone interpreter with LDT1.0
Next Topic:Debugging issue with standalone interpreter
Goto Forum:
  


Current Time: Wed Jul 23 14:39:04 EDT 2025

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

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

Back to the top