[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: require dll
- From: Michael Bauroth <Michael.Bauroth@...>
- Date: Fri, 17 Apr 2009 12:01:00 +0200
I know ... but you use
_IupRobot.dll' with a 'luaopen__IupRobotLib
_IupRobot.dll' with a 'luaopen__IupRobot
and require "_IupRobot"
Wim Langers schrieb:
Michael : I am working with the two underscores (just tried with one to
make sure), but thanks for confirming.
Petr : I do use __declspec (otherwise it wouldn't even work with
package.loadlib ? I suppose ?)
On Fri, Apr 17, 2009 at 10:36 AM, Petr Štetiar <email@example.com
Wim Langers <firstname.lastname@example.org <mailto:email@example.com>>
> I wrote a C extension to Lua and can load it with 'package.loadlib'.
> I somehow thought that I could load it with require (and not hardcode
> paths). Require finds my dll but then complains that it can't
> specified procedure' ?
> Looked all over the place to find out what's going on, but no
> I also read something about naming conventions : I named the dll
> '_IupRobot.dll' with a 'luaopen__IupRobotLib' (two underscores)
> corresponding lua code 'IupRobot.lua'. Also tried with
> (one underscore) because I read something about automatically
> extra underscore.
Don't forget, that on Windows luaopen_* function should be exported
"__declspec(dllexport)" or using .def file. Try to declare your
something like this "__declspec(dllexport) int