Using MSVC compiler in Qt Creator
-
You can not mix mingw and MSVC compiled libraries, so you will need to get a Qt that was build using MSVC. Qt Creator should pick up MSVC automatically (check in Tools->Options->Tool Chains in Qt Creator 2.2 or later, older versions do not explicitly output which tool chains they had detected, even though it works there, too).
Select a MSVC compiled Qt and you can select the MSVC compilers and off you go. IIRC the windows SDK is sufficient for Qt Creator. The debugging support is of course a big help, too. Visual Studio Express should not be necessary.
-
I downloaded and installed the precompiled framework for VS 2008 and then installed the IDE separately, but nothing happened. It didn't have any compiler in the Projects tab. So I'm kind of stuck. What I'm trying to do right now is this:
http://stackoverflow.com/questions/5601950/how-to-build-qt-for-visual-studio-2010
So I know I didn't want to use Qt in VS, but I don't know what else to do at this point.
-
You cannot mix binaries for various VS versions (2005, 2005+SP1, 2008, 2008+SP1, 2010), they are not binary compatible.
You'll have to compile manually for VS 2010.
Visual Studio is an IDE (GUI) and the tool chain (actual compiler, linker, libraries, etc.). You can use the tool chain with other IDEs too, eg. Qt Creator.
-
Okay, then how do I compile Qt manually so I can use the VS 2010 toolchain?
-
I found "this guide":http://www.holoborodko.com/pavel/2011/02/01/how-to-compile-qt-4-7-with-visual-studio-2010/ in "this thread":http://developer.qt.nokia.com/forums/viewthread/5180 and "another forum thread":http://developer.qt.nokia.com/forums/viewthread/5090 dealing with this topic. Hope that helps.
-
Aha! Somehow I managed to get it to work. I started up Qt Creator and it found the MSVC compiler. Unfortunately now the compiler is complaining about the Qt code (that my predecessor wrote), so I'll have to jump into that and fix it. Looks like he tried to declare character variable arrays without a predefined size, so I'll just have to play around with turning them into pointers. Oh well.
Anyway, thank you all for your help!
-
"http://blog.jesteban.es/compilar-qt/":http://blog.jesteban.es/compilar-qt/
Una solucion :)
-
Take a look at the "README":http://qt.gitorious.org/qt-creator/qt-creator/blobs/master/README provided for building Qt Creator from scratch. Most of the issues mentioned there apply to building Qt as well.