1
Window / Re: clear/draw/display pattern and some others stuff
« on: August 12, 2012, 09:33:32 pm »
Thanks for the quick response guys - that's a good sign
Thanks for the info on double-buffering, makes sense.
On the linker error, I can give some background if that helps (for a living I design/provide APIs for cross platform purposes). In essence MS add some data to each object file you compile, called directives, and these contains things like /DEFAULTLIB:LIBCMT which are then passed to the linker when it's all pulled together. These days on windows there are four choices: LIBCMT, LIBCMTD, MSVCRT, MSVCRTD for each of the release/debug static/dynamic linking choices (dumpbin /all shows you the details).
Ultimately when you get a complaint you're seeing that two modules were compiled differently (/MT, /MTd, /MD, /MDd and so have different defaultlib's specified.
In your case all your libraries contain object files which are specifically specifying either MSVCRT or MSVRTD except for those few modules I mentioned which contains references to LIBCMT - so at least for the libraries I downloaded yesterday there is a mismatch there.
Sometimes it doesn't matter, but sometimes it does if the layout of objects/etc differs when compiling in different modes you can get nasty problems like crashes and whatnot. If you're largely calling C functions, then odds are it won't matter as much.
In any case, that "/Zl" switch I mentioned turns this capability off so that the MS runtime no longer implies a default library and the use can just link regardless of their settings. From memory, you do typically also specify "/MT" just to keep everything sweet, but you won't have any sections containing those DEFAULTLIB statements.
If you're interested, I could take a look at your build files if I get the chance this week?
Thanks for a speedy response!
CC
Edit: I had a quick look and it appears the third party dependancy freetype.lib is compiled as MT, so that's where it's coming from. i didn't check the other third party bits. Hope that helps!
Thanks for the info on double-buffering, makes sense.
On the linker error, I can give some background if that helps (for a living I design/provide APIs for cross platform purposes). In essence MS add some data to each object file you compile, called directives, and these contains things like /DEFAULTLIB:LIBCMT which are then passed to the linker when it's all pulled together. These days on windows there are four choices: LIBCMT, LIBCMTD, MSVCRT, MSVCRTD for each of the release/debug static/dynamic linking choices (dumpbin /all shows you the details).
Ultimately when you get a complaint you're seeing that two modules were compiled differently (/MT, /MTd, /MD, /MDd and so have different defaultlib's specified.
In your case all your libraries contain object files which are specifically specifying either MSVCRT or MSVRTD except for those few modules I mentioned which contains references to LIBCMT - so at least for the libraries I downloaded yesterday there is a mismatch there.
Sometimes it doesn't matter, but sometimes it does if the layout of objects/etc differs when compiling in different modes you can get nasty problems like crashes and whatnot. If you're largely calling C functions, then odds are it won't matter as much.
In any case, that "/Zl" switch I mentioned turns this capability off so that the MS runtime no longer implies a default library and the use can just link regardless of their settings. From memory, you do typically also specify "/MT" just to keep everything sweet, but you won't have any sections containing those DEFAULTLIB statements.
If you're interested, I could take a look at your build files if I get the chance this week?
Thanks for a speedy response!
CC
Edit: I had a quick look and it appears the third party dependancy freetype.lib is compiled as MT, so that's where it's coming from. i didn't check the other third party bits. Hope that helps!