From: klaas.holwerda <kho...@xs...> - 2005-12-26 15:21:54
|
Hi, John Labenski wrote: >> >> > >Humm, what compiler, version of wxWidgets? > > Vc6.0 Sp5 wx2.6.2 >I haven't seen this using VC6 or in gcc. I did have some problems with >VC 2003, the free command line one, but I thought it was an oddity. > > If it was only my application, but wxLua seems to have the same problem here. Crash in same stack, with class name wxLuaDebugServer. Same wxLuaedit, but there it is wxLuaShell. This is using the VCproject files like in CVS. In wxArt2D i use Cmake generated project files, so this is no the problem ( linking order etc. ). > > >You should access the lua_State through the m_wxlState.GetLuaState(). >The app wxLua still has the lua_State as a member as a throwback to >the old way and will be removed when I get a chance. > Oke i see, was wondering already why ;-) I just a copy paster here, since i do not understand how everything works together. Once i can actually run something, i think things will become more clear to me. Still i very much hope you will find some time to make a state ot the art sample, to demo how it is done. Not that i what to be pushing ;-) > The whole idea of >using the wxLuaState is that you won't have problems of destroying the >pointer to the lua_State and then trying to access it later. > > Oke, i understand now. Although i don't get that reference counting mechanism. ( like brush and pens in wxWidgets right?) Is it possible that one wants to derive from wxLuaState? I wonder if plain smart pointers would have bin easier/better or not? Not that i know, but in wxArt2D i had problems deriving from wxBrush because of this. In any case, i hope my problems or not due to this. > >What is this string? It should be the name of the class it's trying to >add. > It is! But constantly some othere classname, depending upon the first on added in some app. > I have no idea why this should happen. I guess the stack is >getting messed up by some earlier static initialization and carrying >through. > I think too, and it is related to wxLuaState here :-( >This will be tough to track through, We can look at the >linking order of the object files to follow them backwards to see what >is being initialized before this code is run. > > How to do that? I will now try to test wxLua on Vc.Net, see if the problem is the same there. How is it possible i have this problem and you don't? The only warning i do get is the next, but this doe not harm i think. Linking... LINK : warning LNK4098: defaultlib "MSVCRT" conflicts with use of other libs; use /NODEFAULTLIB:library wxluaedit.exe - 0 error(s), 1 warning(s) Regards, Klaas |