2012/5/15 MARTIN Pierre <[email protected]>: > Dear list readers, > > Related to the msvcrXX.dll problem i have, i'm trying to understand > how to tell my toolchan that i'll be willing to use msvcr80. > So i found this page: http://www.mingw.org/wiki/SpecsFileHOWTO > wich is talking about modifying the specs of gcc. > > However, something is unclear and really hardly findable > on the net. As i'm compiling the Qt IFW project, i have to > use the QMake build system for makefiles generation. Right > now, i'm not sure if i would have to change the makefiles once > they are generated by QMake, or if i would have to change > something in Qt's mkspecs (i'm using the default win32-g++ one), > or even if i would create a GCC-specific specs file that would > override the defaults it uses. > > Clearly, i can see right now that GCC is using msvcrt thanks to > the output of "gcc -dumpspecs": > *libgcc: > %{mthreads:-lmingwthrd} -lmingw32 %{shared-libgcc:-lgcc_s} > %{!shared-libgcc:-lgcc_eh} -lgcc -lmoldname -lmingwex -lmsvcrt > > But now, let's say i dump the whole specs to a file, and then i change > this file. The HOWTO page says that later when building a program, > gcc can be invoked with the -specs="my_new_specs_path" option. > > Would that be the way that is the best for such case? The thing is, > once i'll be done with this investigation, i would like to submit all the > changes to the Qt IFW project, and i'm not sure if a GCC specs file > is a good idea at all. So instead, is there a way to change specs on > a value-basis? For instance, in the Qt IFW project files, i could say: > GCC += "-specs=/mingw/msvcr80_specs", but this would involve > an external file to be made. i would rather like to be able to do > something like: > GCC += "-specs-override-libgcc=-lmsvcr80" > which would override the default msvcrt to msvcr80. Is there such > per-value override, or anything allowing to change the specs "on-the-fly" > without an external full specs file? > > Not sure if i'm being clear enough. > > Thanks for your guidance, > Pierre.
Well, you can use .spec file to change default link-library. This is for sure something for the advanced user of gcc. I would recomment that you just take care that on link-command the last user-specified library is '-lmsvcr??' (where ?? is the desired version number). Be aware that you might need now a manifest-file to launch your application. Of course it is better to use for one application everywhere the same C runtime-library. Therefore also the DLLs should be linked against the same msvcr??.dll, too. Regards, Kai ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
