From: John L. <jla...@gm...> - 2006-05-13 21:52:52
|
ps. I've also posted this on <lu...@ba...> to see if anyone there can clarify how to deal with this in MSW. On 5/13/06, John Labenski <jla...@gm...> wrote: > In the wxLua/apps/luamodule dir is code to make lua require"wx" work in L= inux. > > You create the wx.so library by running $make in the > wxLua/apps/luamodule/src dir and all of wxLua will be created for you. > The output wx.so lib is just dumped in the src dir for now. The > Makefile uses the wx-config script and therefore it MUST be in your > path. Additionally it puts the resultant wxLua libs it creates in the > appropriate lib dir of wxWidgets so it must be writeable. As a > developer I never bother to install wxWidgets, but if you have you'll > have to hack the Makefiles located in each XXX/src dir to output them > elsewhere. The Makefiles are fairly straightforward so this shouldn't > be difficult. Eventually we'll get the bakefile's configure to work > with this new project. > > A sample program called luamodule.wx.lua in that dir shows it working > by simply creating a wxFrame. Test it from the > wxLua/apps/luamodule/src dir using > $../../../bin/lua luamodule.wx.lua > > ps. Francesco can you rebake the files. I have added back the > -DWXLUA_CODE define, now called WXLUA_LUA_NEWTHREAD for clarity in > modules/build/bakefiles/modules.bkl. We had to remove that previously, > but now I see that it's required for using wxLua as a module. > > Also, about adding this to bakefile? Note: The output must > unfortunately be called wx.so since otherwise require"wx" will fail. > > I don't really understand completely what I've done, but it seems to > work. See apps/luamodule/src/Makefile and the wx.so: tag. I guess I'm > compiling the luamodule.cpp file, linking it with all the other libs, > and then creating a .so library using -shared. I think also that -fpic > is needed. > > I haven't the foggiest idea about how to do the same in MSW, I guess > it should be a DLL? But then how do you "link" this DLL to all of the > wxLua and wxWidgets DLLs or can you create the wxLua and wxWidgets > libs as libs and link them to the DLL? > > Maybe someone who uses lua's require more regularly can shed some light o= n this? > > Regards, > John Labenski > |