PDA

View Full Version : how to compile with msvc express 2008



john_god
7th March 2009, 21:05
I buid my qt static in release mode as described in the wiki and I got a executable that
works fine in other machines without Qt. The size of the file is around 7Mb, I think its to big for my small aplication. I am using mingw in Qt Creator and windows Vista.

Now I'm trying to compile with visual express 2008, to see if the size of the file decreases.

How do I compile with visual exprees 2008 ????

It will be enought to put the QMAKESPEC set to win32_msvc2008 ?????

I tried QMAKESPEC=c:\qt\4.4.3.\bin\mkspecs\win32-msvc2008 and got an error

help

Boron
8th March 2009, 13:38
...and got an errorSo you got an error?
Nice!
Could you please provide the error message?

You can create a VS project with qmake.
Run "qmake -t vcapp" in the directory where your pro file lies (c:\qt\4.4.3.\bin should be in the PATH environment variable).

john_god
8th March 2009, 22:45
The error, translated from portuguese, is something like:

'qmakespec' is not recognizible as a internal or external comand, operacional program or batch file

I don't want to create a visual studio project, want to keep using qt creator, and change from mingw to microsoft compiler, can I do that ???

BTW I used the qt comand line

Private_Parts
17th March 2009, 20:23
Of course you can use Qt Creator with the Microsoft Compiler. But you will need a Qt, built with the Microsoft C++ compiler - either the one shipped with the platform SDK or Visual C++ Express.
To compile Qt with msvc you will have to open a command prompt with the appropriate environment set. The Qt command prompt that comes with Qt Creator is for the MinGW gcc compiler. Thou shalt not mix environments.

Then you configure Qt like this:
configure -platform win32-msvc2005
or
configure -platform win32-msvc2008
depending on the compiler version you're using. After that type "nmake" and the Qt build starts. Then you can set up your new Qt version in the build settings of Qt Creator and start to use it.

john_god
22nd March 2009, 14:09
Thanks PrivateParts, I did that and it work but Im gonna stick with the mingw.
Qt with Visualc express cost me another 10Gb of hard disk, and I got errors with a project that I have, errors related with the math.h library, but it works fine with mingw.