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 |