Open source dev on windows: MinGW vs MSVC
I am happy that Qt open source edition can now be used with Microsoft Visual Studio express edition, and have recently switched to using the free version of Visual Studio (express 2008) for open source development (I use it on command line and in conjunction with HaiQ). I have found two primary advantages of using MSVC over MinGW compiler:
1. Compilation speed. As mentioned in a recent thread, it is apparently well known that MS compilers are faster.
2. Compatibility with Linux. I have found that visual studio will give certain errors and warnings that MinGW misses by default, and therefore my code is now more likely to compile in Linux on first try.
Here are some basic instructions for using Qt with visual studio express.
Step 1. Download latest Qt source (see http://qtcentre.org/)
Step 2. Download and install Microsoft Visual C++ express edition from here.
Step 3. Open a Visual Studio command prompt (from start menu).
Step 4. Change to Qt source directory, and run configure.exe.
Step 5. Run nmake. Qt source will be compiled.
Step 6. Use the following environment variables: QTDIR=[location of Qt source], QMAKESPEC=win32-msvc.net, and add the Qt bin directory to your path.
Step 7. To compile Qt projects, open a Visual Studio command prompt, and type qmake/nmake.
Step 8 (Recommended by me). Get the latest (development source) of HaiQ (available via svn), compile and run from within visual studio command prompt. And configure to use "nmake" instead of "mingw32-make". (Don't expect a debugger, because there's none).
I have been working on this for some time now, and it is my opinion that this technique is the most efficient and most convenient way to develop open source Qt on windows. I hope you find success, and enjoy it as much as I do. :)
Re: Open source dev on windows: MinGW vs MSVC
You forgot to mention that to use the Express edition of msvc the SDK (around 100MB) also needs to be downloaded from Microsoft.
Re: Open source dev on windows: MinGW vs MSVC
Quote:
Originally Posted by
magland
Step 6. Use the following environment variables: QTDIR=[location of Qt source], QMAKESPEC=win32-msvc.net, and add the Qt bin directory to your path.
Why win32-msvc.net? There is win32-msvc2005 for msvc2005 (it works also with 2008, until official support).
Quote:
Originally Posted by
wysota
You forgot to mention that to use the Express edition of msvc the SDK (around 100MB) also needs to be downloaded from Microsoft.
That is no longer needed with MSVC 2008 express, as it includes headers and libraries for native Windows programming.
Re: Open source dev on windows: MinGW vs MSVC
Is the VS2008 Express Edition and qt-win-opensource-src-4.3.3 combination what Qt is calling Visual Studio "Integeration" or is this combination just to use the vs compiler?
Is the Commercial Edition of Qt the only way to achieve Visual Studio "Integration"? Does "Integration" also include debugger support?
Does the Commercial Edition also work with VS2008 Pro or VS2008 Express Edition (instead of vs2005)?
thanks,
shawnj
Re: Open source dev on windows: MinGW vs MSVC
The Qt VS Integration is a Visual Studio extension available only with commercial editions of Qt. It provides mostly Qt project management support within VS and Designer integration.
Non-Express versions of Visual Studio do not support extensions, therefore you cannot use Qt Integration with VS Express.
Quote:
Does "Integration" also include debugger support?
Debugging support comes with the VS compiler and is embedded in all versions of the IDE.
Of course, in order to debug Qt applications you must first compile the Qt debug libraries.