PDA

View Full Version : Why does the Qt 5.4.1 download setup target specific compiler versions?



kito408
5th May 2015, 02:48
Hi,

I downloaded "Qt 5.4.1 for Windows 64-bit VS 2013" setup to try it out. QT creator was able to auto detect VS2013 compiler automatically detected and used it with no issues. I wanted to switch the compiler Visual Studio 2012, but based on the file name it looks by the you need a specific Qt setup for a specific compiler version.

It was not able to find a pre built Qt5.4.1 setup for VS2012 for 64-bit. I did see a 32-bit version.

Inside QT Creator I manually created a kit and switched the compiler to VS2012 64 bit instead of VS2013, but I only have one Qt version installed which is for VS2013. There is a red ! stop icon in the QT Creator Kit dialog with the message "The compiler "... cannot produce code for the Qt version Qt 5.4.1 MSVCS2013 64bit..." I ignored the message and successfully compiled & linked a console app that runs with the VS2012 kit. I verified the compiled executable was using the VS2012 run time.

So I realize that ignoring this error message is probably not a good idea.

Is it possible to get a pre built setup for "Qt 5.4.1 for Windows 64-bit for VS 2012"? I see a 32-bit version, but I need to use the 64-bit version.

d_stranz
5th May 2015, 04:58
So I realize that ignoring this error message is probably not a good idea.

Yeah, probably not. You got lucky this time, but maybe the next program uses something that sinks the boat.

Every compiler version (MSVC or whatever) needs its own Qt build for compatibility. The Qt folks do not have the bandwidth to produce a precompiled Qt distribution for every compiler and version on the planet, so they choose the ones which are most current / most used. I have to maintain VS 2008 compatibility for internal reasons in my projects, so I have to build my Qt distributions from source since there are no pre-built binaries for that any more. And even if there were, for internal reasons I need to use wchar_t as a defined type rather than a built-in type, and the pre-built distributions all use it as a built-in type. So no matter what, I have to build from source.

It's a pain in the butt. I have asked if the Qt folks can make available the configure options they use to build canned distributions, but for some reason this isn't possible. So I set up a Windoze BAT file that fires off configure with what I think are the best configure options for my use, and let it build. It usually take a couple of tries (and hours of CPU time) before you get something that works for you.

Sorry I can't be more helpful, but that's life in the LGPL / open source world. I'm hapy to share my VS 2008 configuration, but that's a 32-bit build and doesn't include most of the optional Qt libraries.