Results 1 to 5 of 5

Thread: Open source dev on windows: MinGW vs MSVC

  1. #1
    Join Date
    Feb 2007
    Location
    Philadelphia, USA
    Posts
    255
    Thanks
    43
    Thanked 21 Times in 21 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default 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.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default 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.

  3. The following user says thank you to wysota for this useful post:

    magland (26th December 2007)

  4. #3
    Join Date
    Nov 2007
    Posts
    89
    Thanked 21 Times in 18 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Open source dev on windows: MinGW vs MSVC

    Quote Originally Posted by magland View Post
    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 View Post
    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.

  5. #4
    Join Date
    Dec 2007
    Posts
    4
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default 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

  6. #5
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default 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.

    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.

  7. The following user says thank you to marcel for this useful post:

    shawnj (29th December 2007)

Similar Threads

  1. Mingw very slow on windows
    By elsheikhmh in forum Installation and Deployment
    Replies: 7
    Last Post: 30th May 2007, 18:19
  2. Installing Qt 4.1.4 (open source) on windows with vs2005
    By Randulf in forum Installation and Deployment
    Replies: 1
    Last Post: 19th August 2006, 13:22
  3. Licencing issue with Qt Open source
    By thepasty in forum General Discussion
    Replies: 16
    Last Post: 26th July 2006, 15:56
  4. Replies: 11
    Last Post: 24th March 2006, 07:40
  5. Installing Qt 4.1 (open source) on Windows XP
    By katrina in forum Installation and Deployment
    Replies: 8
    Last Post: 19th February 2006, 13:26

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.