[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: require dll
- From: Wim Langers <wim.langers@...>
- Date: Fri, 17 Apr 2009 11:20:17 +0200
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> [2009-04-17 09:51:37]:
Don't forget, that on Windows luaopen_* function should be exported either using
> 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 find 'The
> specified procedure' ?
> Looked all over the place to find out what's going on, but no success.
> I also read something about naming conventions : I named the dll
> '_IupRobot.dll' with a 'luaopen__IupRobotLib' (two underscores) and the
> corresponding lua code 'IupRobot.lua'. Also tried with 'luaopen_IupRobotLib'
> (one underscore) because I read something about automatically removing the
> extra underscore.
"__declspec(dllexport)" or using .def file. Try to declare your function like
something like this "__declspec(dllexport) int luaopen__IupRobotLib(lua_State *L)".