John Labenski ha scritto:
In the wxLua/apps/luamodule dir is code to make lua require"wx" work in
Linux.
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.
yes, sure
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.
Done...
Also, about adding this to bakefile? Note: The output must
unfortunately be called wx.so since otherwise require"wx" will fail.
I have a little mess currently with wxWidgets as I have various
installed versions and all patched so it will take me a bit before being
able to test the bakefiles for luamodule but I've already written the
necessary stuff ;)
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,
yes, sure
linking it with all the other libs,
yes but this is a dynamic link (wx.so is only 150K on my system)
and then creating a .so library using -shared. I think also that -fpic
is needed.
yes, -fpic is for generating code for shared objects (pic = position
independent code)...
I haven't the foggiest idea about how to do the same in MSW, I guess
it should be a DLL?
yes, I think so.
But then how do you "link" this DLL to all of the
wxLua and wxWidgets DLLs
using the import libraries generated when creating the DLL (i.e. when
you compile with SHARED=1 both .lib and .dll files are created - the
.lib are import libraries).
or can you create the wxLua and wxWidgets
libs as libs and link them to the DLL?
if I got it right then: no it's not possible.
code compiled in "DLL" mode is different from code compiled for static
linking.
Francesco
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Wxlua-users mailing list
Wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users