PDA

View Full Version : Using MSVC compiler with QtCreator on Windows XP



pssss
21st January 2011, 20:08
Hello,

I've seen that to make my Qt applications compile with MSVC I need to set the build steps in the Build options of the project. Can someone please tell me how to do this? I have no idea how and I can't find anything on the Internet, I've searched for hours.

Thanks.

high_flyer
21st January 2011, 20:34
I've seen that to make my Qt applications compile with MSVC I need to set the build steps in the Build options of the project.
Huh?
Can you explain a bit more what do you mean?

pssss
21st January 2011, 20:45
Yes. By default QtCreator uses MinGW to compile applications on Windows XP, if I want to use Microsoft Visual C++ compiler I need to configure something called "build steps" for my project but I don't know how to do this.

Lykurg
21st January 2011, 21:07
Normally when you install the libraries for msvc and choose them in the configuration dialog, Qt Creator will use the msvc for building. If that is not working, you have to specify the spec file. (It is the -spec flag, see the qmake documentation for more informations about that.)

So first have you installed the right version of the Qt library?

pssss
21st January 2011, 21:12
Hi thanks for answering.

I only installed QtCreator. I have searched everywhere but I don't know how to make this work. I didn't install any extra libraries, I've searched before replying to you for such libraries and I didn't find anything. I don't know if it's that no one uses this or that my Google skills suck.


Perhaps I should also mention that I'm using an Express edition of MSVC in case it makes any difference.

Lykurg
21st January 2011, 22:55
http://qt.nokia.com/downloads -> LGPL -> Qt: Framework Only -> Qt libraries 4.7.1 for Windows (VS 2008, 228 MB)

pssss
22nd January 2011, 16:04
Thanks, I downloaded that, tried to make it work with QtCreator but gave up, I'm now on Linux trying to make Phonon work with avi files and youtube urls.

Ashutosh2k1
16th February 2011, 04:33
Hi
I am also searching the answer for that question so In this case we have to first install the qt creator by qt sdk open source and then again we have to install the qt win commercial 4.7
is this right? please tell me
Hoping for reply

ChrisW67
16th February 2011, 05:16
If you install the Qt SDK, which bundles the MingW compiler, then you get a version of Qt built with MingW. By default this Qt will use the MingW compiler and your program will be built using it.

If you download and install the Qt libraries 4.7.1 for Windows (VS 2008, 228 MB) Lykurg pointed to above in parallel with the SDK install then you can tell Qt Creator to use that set of Qt tools/libraries to build your applications. The qmake from that set of libraries should use VS2008 by default. In Qt Creator:

Select Tools menu, Options, and then Qt4.
Locate the qmake from the bin directory of VS2008 version of Qt.
Give the new Qt instance a meaningful name.
This version of Qt is now available for use in your projects. To use the VS2008 version for a specific project edit the Build Settings of the project.

At least that's how I think it should work... I don't have a machine handy to test it on.