From: Francesco M. <f18...@ya...> - 2006-05-20 21:58:06
|
Hi, I did various changes and now using SHARED=1 option wxLua compiles smoothly as a dll also on windows. Nonetheless, there are two problems: 1) the wx.dll which is created by MSVC, generates the following error when used through luamodule.wx.lua sample: "Cannot find a required procedure" (the message is localized so I'm translating it)... maybe that's because wx.dll is a dll which in reality does not contain any code apart from wxLua\modules\luamodule\src\luamodule.cpp (it's just 34K IIRC) ? Nonetheless it should force lua to import all other DLLs from which it depends (wxlua* and wx* ones)... Unfortunately I've upgraded to latest Mingw which gives an internal error when compiling wx_bind.cpp and borland is giving me strange errors about wxLUA_DECLARE_ENCAPSULATION so I can't verify if this happens also with other win32 compilers... 2) setting the #define wxLuaDebugServer to 1 in wxluasetup.h generates a dependency of wxbind module to the wxluasocket (and thus also to wxluadebug) module. Is this a good thing to do ? Shouldn't we keep all wxLuaDebugServer stuff in the wxluasocket module? Thanks, Francesco |
From: Francesco M. <f18...@ya...> - 2006-05-21 14:51:28
|
Francesco Montorsi <f18m_cpp217828@...> writes: > 1) the wx.dll which is created by MSVC, generates the following error > when used through luamodule.wx.lua sample: > > "Cannot find a required procedure" > > (the message is localized so I'm translating it)... maybe that's because > wx.dll is a dll which in reality does not contain any code apart from > wxLua\modules\luamodule\src\luamodule.cpp (it's just 34K IIRC) ? > Nonetheless it should force lua to import all other DLLs from which it > depends (wxlua* and wx* ones)... Ok, it was late and I was definitevely sleeping: adding right export/import symbols for luamodule, MSVC's wx.dll works perfectly... Francesco |
From: John L. <jla...@gm...> - 2006-05-23 01:21:28
|
On 5/20/06, Francesco Montorsi <f18...@ya...> wrote: > Hi, > I did various changes and now using SHARED=1 option wxLua compiles > smoothly as a dll also on windows. > > Nonetheless, there are two problems: > > 1) the wx.dll which is created by MSVC, generates the following error > when used through luamodule.wx.lua sample: > > "Cannot find a required procedure" > > (the message is localized so I'm translating it)... maybe that's because > wx.dll is a dll which in reality does not contain any code apart from > wxLua\modules\luamodule\src\luamodule.cpp (it's just 34K IIRC) ? > Nonetheless it should force lua to import all other DLLs from which it > depends (wxlua* and wx* ones)... Sounds like you got this fixed in your next message. :) > Unfortunately I've upgraded to latest Mingw which gives an internal > error when compiling wx_bind.cpp and Where, what? There are a lot of #if statements, maybe too many for it? >borland is giving me strange errors > about wxLUA_DECLARE_ENCAPSULATION so I can't verify if this happens also > with other win32 compilers... Anything that can be fixed? Borland is pretty antique isn't it? IIRC you cannot build a lib since it overflows trying to build wxWidgets itself. I guess it's only usable for DLLs. > 2) setting the #define wxLuaDebugServer to 1 in wxluasetup.h generates a > dependency of wxbind module to the wxluasocket (and thus also to > wxluadebug) module. Is this a good thing to do ? > Shouldn't we keep all wxLuaDebugServer stuff in the wxluasocket module? Yes. This is a throwback to when we had a single monolithic binding. I can change this so that the wxLuaSocket stuff will go into modules/wxluasocket. This means that there will be another binding dir wxluasocket and it will output into the wxluasocket module src dir to get compiled along with the current wxluasocket code. -John Labenski |
From: Francesco M. <f18...@ya...> - 2006-05-23 17:20:11
|
John Labenski ha scritto: > On 5/20/06, Francesco Montorsi > <f18...@ya...> wrote: >> Hi, >> I did various changes and now using SHARED=1 option wxLua compiles >> smoothly as a dll also on windows. >> >> Nonetheless, there are two problems: >> >> 1) the wx.dll which is created by MSVC, generates the following error >> when used through luamodule.wx.lua sample: >> >> "Cannot find a required procedure" >> >> (the message is localized so I'm translating it)... maybe that's because >> wx.dll is a dll which in reality does not contain any code apart from >> wxLua\modules\luamodule\src\luamodule.cpp (it's just 34K IIRC) ? >> Nonetheless it should force lua to import all other DLLs from which it >> depends (wxlua* and wx* ones)... > > Sounds like you got this fixed in your next message. :) yes, exactly ;) > >> Unfortunately I've upgraded to latest Mingw which gives an internal >> error when compiling wx_bind.cpp and > > Where, what? There are a lot of #if statements, maybe too many for it? it was an internal gcc bug (https://sourceforge.net/tracker/?func=detail&atid=102435&aid=1492239&group_id=2435) which I've been told has been fixed in gcc 4; I'll try with it asap. > >> borland is giving me strange errors >> about wxLUA_DECLARE_ENCAPSULATION so I can't verify if this happens also >> with other win32 compilers... > > Anything that can be fixed? I didn't dig too deep but I'll do. > Borland is pretty antique isn't it? the free version yes; but it's still the fastest compiler ever created and it also produces very fast executables :) >IIRC > you cannot build a lib since it overflows trying to build wxWidgets > itself. there is an excess of debug info when using BUILD=debug SHARED=0, but since I mainly use it only for release builds this has never been a big problem for me > I guess it's only usable for DLLs. or for static release libraries - BTW I think that next wxLua binary releases for win32 should use DLLs (so that one can just redistribute the *dll files without even have to recompile wxLua statically in its project)... > >> 2) setting the #define wxLuaDebugServer to 1 in wxluasetup.h generates a >> dependency of wxbind module to the wxluasocket (and thus also to >> wxluadebug) module. Is this a good thing to do ? >> Shouldn't we keep all wxLuaDebugServer stuff in the wxluasocket module? > > Yes. This is a throwback to when we had a single monolithic binding. I > can change this so that the wxLuaSocket stuff will go into > modules/wxluasocket. This means that there will be another binding dir > wxluasocket and it will output into the wxluasocket module src dir to > get compiled along with the current wxluasocket code. I think this should be done... Francesco |
From: John L. <jla...@gm...> - 2006-05-24 05:03:48
|
On 5/23/06, Francesco Montorsi <f18...@ya...> wrote: > >> 2) setting the #define wxLuaDebugServer to 1 in wxluasetup.h generates a > >> dependency of wxbind module to the wxluasocket (and thus also to > >> wxluadebug) module. Is this a good thing to do ? > >> Shouldn't we keep all wxLuaDebugServer stuff in the wxluasocket module? > > > > Yes. This is a throwback to when we had a single monolithic binding. I > > can change this so that the wxLuaSocket stuff will go into > > modules/wxluasocket. This means that there will be another binding dir > > wxluasocket and it will output into the wxluasocket module src dir to > > get compiled along with the current wxluasocket code. > I think this should be done... This has been done. Three new files that are in the wxluasocket module since they are tied to it. modules/include/wxluasocket_bind.h modules/src/wxluasocket.cpp modules/src/wxluasocket_bind.cpp in addition to bindings/wxluasocket. -John Labenski ps. I think you may have inadvertently broken the wxstc bindings when you changed the #include for the wxbindstc lib from wxbind/include/wxbind.h to wxbindstc/include/wxbind.h in the wxstc rules file. The wxbindstc lib requires the wxbind lib and I just include the wxbind include to get at wxluasetup.h. Is this a problem? The bottom line is that the wxluasetup.h has to be included since the wxbindstc lib uses some of the wxLUA_USE_XXX like wxPointSizeRect and if you don't include that you don't get the wxStyledTextCtrl constructor! Running the apps/wxlua app is a very good test to see if things are generally ok which is why I'm so insistent that it's easy to build and all defaults are catered to fully building it at the expense of making it easy to build anything else. |
From: Francesco M. <f18...@ya...> - 2006-05-24 08:57:38
|
John Labenski ha scritto: > On 5/23/06, Francesco Montorsi > <f18...@ya...> wrote: >> >> 2) setting the #define wxLuaDebugServer to 1 in wxluasetup.h >> generates a >> >> dependency of wxbind module to the wxluasocket (and thus also to >> >> wxluadebug) module. Is this a good thing to do ? >> >> Shouldn't we keep all wxLuaDebugServer stuff in the wxluasocket >> module? >> > >> > Yes. This is a throwback to when we had a single monolithic binding. I >> > can change this so that the wxLuaSocket stuff will go into >> > modules/wxluasocket. This means that there will be another binding dir >> > wxluasocket and it will output into the wxluasocket module src dir to >> > get compiled along with the current wxluasocket code. >> I think this should be done... > > This has been done. > > Three new files that are in the wxluasocket module since they are tied > to it. > > modules/include/wxluasocket_bind.h > modules/src/wxluasocket.cpp > modules/src/wxluasocket_bind.cpp > > in addition to bindings/wxluasocket. Great! I've rebaked and now everything works with current wxluasetup.h also for win32's dlls. > > -John Labenski > > ps. I think you may have inadvertently broken the wxstc bindings when > you changed the #include for the wxbindstc lib from > wxbind/include/wxbind.h to wxbindstc/include/wxbind.h in the wxstc > rules file. The wxbindstc lib requires the wxbind lib and I just > include the wxbind include to get at wxluasetup.h. Is this a problem? No, it's not. Unfortunately I did not thought that wxbindstc requires wxbind... > The bottom line is that the wxluasetup.h has to be included since the > wxbindstc lib uses some of the wxLUA_USE_XXX like wxPointSizeRect and > if you don't include that you don't get the wxStyledTextCtrl > constructor! Running the apps/wxlua app is a very good test to see if > things are generally ok which is why I'm so insistent that it's easy > to build and all defaults are catered to fully building it at the > expense of making it easy to build anything else. Ok, I'll remember to always test wxlua app after building. Francesco |