From: k. h. <kla...@nl...> - 2006-01-04 08:19:10
|
Hi, Bill Baxter wrote: > Thank you thank you thank you! You saved my hair and my monitor! > > I thought it looked an awful lot like a nodefault lib setting, but in > the IDE the nodefaultlib switch wasn't being set. I guess I don't > really understand yet how the MSVC IDE and CMAKE interact. I thought > the idea was that cmake generated some project files, and then you > could use those project files just like usual. But apparently there's > something else going on behind the scenes. No that is not true, Cmake generates them and that is it. The switch is really there. (Project Settings/Link tab ) > > I tried commenting out the line you said and then it linked like a > charm. Just wish I could have my three hours back from last night... Just imagine how many days i have bin searching in my life for bugs like this, and you should feel happy again. ;-) > > As for the problem with wxLua that prompted you to add nodefaultlib in > the first place, that sounds like wxLua isn't being built with the > right CRT libraries. What in the world or CRT libraries?? > And wxLua may be using the wrong CRT because lua itself was built > using the wrong libraries. I seem to recall Lua being set up by > default to build with /MT instead of /MD. In debug mode i see: /MDd Creates a debug multithreaded DLL, using MSVCRTD.LIB But this i do not understand already, because i am not generating DLL?? In release mode i see: /MD Creates a multithreaded DLL, using MSVCRT.LIB Same story, but at least it says that it needs MSVCRT.LIB, so i assume remove switch /nodefaultlib:"MSVCRT.lib" And looking at wxLua, i see /MDd for debug, and /MD for all release builds. In debug mode the switch /nodefaultlib:"MSVCRT.lib" is there if not DLL builds and not unicode For the moment i only set this switch when debug is ON. ( so also when building shared, which does not work anyway in VC6) > I could be wrong though. This whole multiple CRT-versions business is > an unbelievable confusing mess on Microsoft's part. It's seriously > the single worst thing about developing on Windows. I am starting to understand this too :-( Regards, Klaas -- Unclassified |
From: John L. <jla...@gm...> - 2006-01-04 17:12:53
|
I don't understand, is there really a problem and what is the fix? Regards, John Labenski On 1/4/06, k. holwerda <kla...@nl...> wrote: > Hi, > > Bill Baxter wrote: > > > Thank you thank you thank you! You saved my hair and my monitor! > > > > I thought it looked an awful lot like a nodefault lib setting, but in > > the IDE the nodefaultlib switch wasn't being set. I guess I don't > > really understand yet how the MSVC IDE and CMAKE interact. I thought > > the idea was that cmake generated some project files, and then you > > could use those project files just like usual. But apparently there's > > something else going on behind the scenes. > > No that is not true, Cmake generates them and that is it. The switch is > really there. (Project Settings/Link tab ) > > > > > I tried commenting out the line you said and then it linked like a > > charm. Just wish I could have my three hours back from last night... > > Just imagine how many days i have bin searching in my life for bugs like > this, and you should feel happy again. ;-) > > > > > As for the problem with wxLua that prompted you to add nodefaultlib in > > the first place, that sounds like wxLua isn't being built with the > > right CRT libraries. > > What in the world or CRT libraries?? > > > And wxLua may be using the wrong CRT because lua itself was built > > using the wrong libraries. I seem to recall Lua being set up by > > default to build with /MT instead of /MD. > > In debug mode i see: > > /MDd Creates a debug multithreaded DLL, using MSVCRTD.LIB > > But this i do not understand already, because i am not generating DLL?? > In release mode i see: > > /MD Creates a multithreaded DLL, using MSVCRT.LIB > Same story, but at least it says that it needs MSVCRT.LIB, so i assume > remove switch /nodefaultlib:"MSVCRT.lib" > > And looking at wxLua, i see /MDd for debug, and /MD for all release > builds. > In debug mode the switch /nodefaultlib:"MSVCRT.lib" is there if not > DLL builds and not unicode > > For the moment i only set this switch when debug is ON. ( so also when > building shared, which does not work anyway in VC6) > > > I could be wrong though. This whole multiple CRT-versions business is > > an unbelievable confusing mess on Microsoft's part. It's seriously > > the single worst thing about developing on Windows. > > I am starting to understand this too :-( > > Regards, > > Klaas > > > > -- > Unclassified > > > > ------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. Do you grep through log fi= les > for problems? Stop! Download the new AJAX search engine that makes > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! > http://ads.osdn.com/?ad_id=3D7637&alloc_id=3D16865&op=3Dclick > _______________________________________________ > Wxlua-users mailing list > Wxl...@li... > https://lists.sourceforge.net/lists/listinfo/wxlua-users > |
From: klaas.holwerda <kho...@xs...> - 2006-01-04 20:04:51
|
John Labenski wrote: >I don't understand, is there really a problem and what is the fix? > > There is a problem if building with /NODEFAULTLIB:MSVCRT.LIB in release mode. Many errors of missing symbols. The solution is not yet clear. I saw that wxLua is oke on this, since it does not have this switch in release mode, but it is still maybe not right. ( before i forget, in the wxLua target in the project file wxLua.dsw, there is something strange with the relase build when choosen in the project settings ). Or it is not there, or when choosen wxLua disappears. Can you read the wxArt2D mailinglist on this problem? Maybe together we can find a solution Regards, Klaas |
From: klaas.holwerda <kho...@xs...> - 2006-01-04 20:54:23
|
Hi John and Franscesco, Do you know where this setting comes from? On the wxArt2d list knowledgable persons think it is not a good idea, and should be solved different. BTW Franscesco would it be possible to enable debug info in the lua part of wxLua? I am well on the way with my bindings, when i am ready i will try to make a simple example, to be used as a template in wxLua, unless someone else prefers to do it? Regards, Klaas klaas.holwerda wrote: > There is a problem if building with /NODEFAULTLIB:MSVCRT.LIB in > release mode. |
From: Francesco M. <f18...@ya...> - 2006-01-04 22:48:11
|
Hi, klaas.holwerda wrote: > Do you know where this setting comes from? > On the wxArt2d list knowledgable persons think it is not a good idea, > and should be solved different. sorry but I didn't followed the thread. If I understand it correctly, there is a problem having "/NODEFAULTLIB:MSVCRT.LIB" in release builds using MSVC6, right ? > > BTW Franscesco would it be possible to enable debug info in the lua > part of wxLua? aren't them already included when using WX_DEBUG=1 ? I wxLua/build/bakefiles/wxluabase.bkl I see: .... <set var="DEBUGINFO"> <if cond="WX_DEBUG=='1'">on</if> <if cond="WX_DEBUG=='0'">off</if> </set> ... <template id="wxlua-base"> .... <debug-info>$(DEBUGINFO)</debug-info> .... which sets the debug info ON in debug builds only. Why should them be needed also on release builds ? Francesco |
From: klaas.holwerda <kho...@xs...> - 2006-01-05 07:49:47
|
Francesco Montorsi wrote: > Hi, > > klaas.holwerda wrote: > >> Do you know where this setting comes from? >> On the wxArt2d list knowledgable persons think it is not a good idea, >> and should be solved different. > > sorry but I didn't followed the thread. > If I understand it correctly, there is a problem having > "/NODEFAULTLIB:MSVCRT.LIB" in release builds using MSVC6, right ? No that was only the beginning, in release mode the switch is not set, only in debug. And it seems to work partly in debug mode, and is risky, see the thread on art2d, it is very informative. People say this switch is also weird to have in debug mode, indicating that somethings is not setup right. wxWidgets does not have this switch. So i wonder where it came from. If we know that, we might think of a solution next. I will try today to compile wxLua wihtout the switch, and see what happens. > > >> >> BTW Franscesco would it be possible to enable debug info in the lua >> part of wxLua? > > .... > which sets the debug info ON in debug builds only. > Hmmm, if i want to step into the lua code, i get only assembler. Also the stack is not shown properly. So i though there is no debug info there. Can this have something to do with lua being C code only? Regards, Klaas |
From: John L. <jla...@gm...> - 2006-01-04 22:51:25
|
On 1/4/06, klaas.holwerda <kho...@xs...> wrote: > Hi John and Franscesco, >>There is a problem if building with /NODEFAULTLIB:MSVCRT.LIB in release > Do you know where this setting comes from? > On the wxArt2d list knowledgable persons think it is not a good idea, > and should be solved different. I read those messages, bakefile doesn't seem to be right. Take a look at wxWidgets/build/msw/makefile.vc, search for "/M" and you see that it uses all sorts of variables to store them. Look also at build/msw/config.vc and samples/minimal/makefile.vc. I'm not sure the best way to do this, we need to get wxLua built identically to wxWidgets, and in your case with the wxArt2D library. I would have thought that bakefile was supposed to have "fixed" this, but I never saw how it could work unless the end users bakefiles (our bakefiles) used all the internal variables of the wxWidgets bakefiles. I fought about that a few times on wx-dev, but I couldn't seem to get the seriousness of this problem across. > I am well on the way with my bindings, when i am ready i will try to > make a simple example, to be used as a template in wxLua, unless someone > else prefers to do it? Ok, I'm sorry things are pretty busy for me right now. -John Labenski |
From: k. h. <kla...@nl...> - 2006-01-05 11:37:01
|
Hi All, John Labenski wrote: >at wxWidgets/build/msw/makefile.vc, search for "/M" and you see that >it uses all sorts of variables to store them. Look also at >build/msw/config.vc and samples/minimal/makefile.vc. > > Whooo, i searched for __RUNTIME_LIBS_ and it is enormous, i wonder if the eventual setting is different all the time. >I'm not sure the best way to do this, we need to get wxLua built >identically to wxWidgets, and in your case with the wxArt2D library. I >would have thought that bakefile was supposed to have "fixed" this, >but I never saw how it could work unless the end users bakefiles (our >bakefiles) used all the internal variables of the wxWidgets bakefiles. >I fought about that a few times on wx-dev, but I couldn't seem to get >the seriousness of this problem across. > > I can't judge it. But searched for NODEFAULT, it is not found. So where does that one come from? Compiling wxLua without setting the switch results in a warning, so maybe someone just added it to get rid of it. LINK : warning LNK4098: defaultlib "MSVCRT" conflicts with use of other libs; use /NODEFAULTLIB:library And looking at a few of the results of the Searching Libraries flag (/VERBOSE:LIB): Searching \data\art2d\wxluacvs\wxLua\lib\vc_lib\wxluasocket.lib: ====>>Searching C:\Program Files\Microsoft Visual Studio\vc98\LIB\MSVCRTD.lib: Searching C:\Program Files\Microsoft Visual Studio\vc98\LIB\OLDNAMES.lib: ====>>Searching C:\Program Files\Microsoft Visual Studio\vc98\LIB\MSVCRT.lib: I do understand that this must be a conflict. But why are those two libraries loaded?? Can one say it is wxluasocket.lib causing this? > > > I read those messages, bakefile doesn't seem to be right. Take a look I see that it is confusing, i can't say they are not right. We first need to figure out why the two conflicting libraries are searched for. I looked at it (wxlua.exe) with the tool "depends", but that does not help much. Someone has an idea on how to find the reason behind loading the two conflicting libs? Regards, Klaas -- Unclassified |