[Qt-interest] Changing the toolchain in Qt Creator

Michael Simpson michaelsimpson at mac.com
Fri Jan 22 17:20:14 CET 2010


Your answer does not answer Tim's question.  

What a development environment is compiled in is irrelevant to the tools it invokes.  What is needed is the ability to associate file extensions with actions.  Tim asked if he could change the tool chain.  I don't know.  I know you could do it with Visual Studio.  We changed it to invoke the gcc compiler and linker.  What you want is for Creator to invoice the MSVC compiler and linker.  ABI and what not does not enter in to the answer.  

i have thought about this as well.  Nokia, if I can't change the compiler and linker, how about adding that feature to creator?  Maybe Creator takes it's hint from make specs?

Michael

On Jan 22, 2010, at 7:52 AM, Ross Bencina wrote:

>> 1. Do I need to compile the entire Qt library and Qt Creator with the
>> microsoft compiler to be able to use it? I've downloaded the Qt SDK
>> exe installer from the website.
>> 2. If so, why? Why can't I choose another compiler from within Qt Creator?
> 
> Short answer: C++ has no ABI so you can't generally mix code compiled by 
> different compilers.
> 
> Long answer:
> Microsoft and mingw intermediate files are incompatible so in general, for 
> any project Qt or not, you need to build the whole project and libs against 
> the same toolchain. In some cases this can be avoided (in theory at least 
> this is relatively easy with C dlls, C++ is another story since the compiler 
> name mangling and calling conventions are also different). Another possible 
> issue arises if your Qt DLLs are built with an MS C++ runtime and your app 
> with a gcc runtime (or vis versa) you could have issues with memory 
> allocator collisions etc.
> 
> As an aside, with MSVC it can be hard to even get things working if the libs 
> and app aren't compiled with the same MSVC version and service pack due to 
> SxS issues.
> 
> 
>> 3. If not, how do I change the toolchain.
> 
> Not sure. Sorry. Perhaps if it detects an MSVC build of Qt installed the 
> option will be enabled.
> 
> 
> Ross. 
> 
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest




More information about the Qt-interest-old mailing list