Results 1 to 8 of 8

Thread: Is it possible to use MinGW compiler in Visual Studio

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Dec 2006
    Posts
    9
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Is it possible to use MinGW compiler in Visual Studio

    Thank you for your help, but it doesn't work yet.

    I get this warnings/errors when I use use qmake to generate a VS project (pass -tp vc option to qmake) with QMAKESPEC set to win32-g++:
    WARNING: Unable to generate output for: C:/SVN/[...]/Makefile.Debug [TE
    MPLATE vcapp]
    WARNING: Unable to generate output for: C:/SVN/[...]/Makefile.Release [
    TEMPLATE vcapp]

    and it doesn't make the .vcproj file

    N.B. It works well if I let QMAKESPEC set to win32-msvc2005 but it's not what I am looking for.
    Last edited by Dauntless; 24th March 2007 at 01:19.

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

    Default Re: Is it possible to use MinGW compiler in Visual Studio

    So maybe you can't have a vs project generated by QMake. In that case you have to use QMake directly (without generating the VS project) - create a custom build that simply calls qmake and mingw-make.

  3. #3
    Join Date
    Dec 2006
    Posts
    9
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Is it possible to use MinGW compiler in Visual Studio

    I tried doing that but I lose the debugging information for my program. I get a "binary was not build with debug information" error, and without the powerful debugging tool that VS has, I think I will go back to QDevelop where at least I have one.

    Here's an article about custom builds that some might find interesting if they use VS.

    N.B. I did make the debug (not the release) version of my program with mingw32-g++.
    Last edited by Dauntless; 24th March 2007 at 11:04.

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

    Default Re: Is it possible to use MinGW compiler in Visual Studio

    For debugging you can compile with MSVC. I don't think Visual Studio can debug MinGW compiled binaries.

  5. #5
    Join Date
    Dec 2006
    Posts
    9
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Is it possible to use MinGW compiler in Visual Studio

    MSVC can't compile parts of my code because I use C POSIX libraries. I know, I have to translate the code myself so it will use win32 api but it is a lot of work and I was thinking if it was possible to change just the compiler so I would use minGW, which does that job for me. Well, anyhow, thanks for your time wysota, I guess I'll stick with QDevelop for now...

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

    Default Re: Is it possible to use MinGW compiler in Visual Studio

    You mean that MSVC has trouble compiling those posix libraries? MSVC has come a long way - it shouldn't have trouble with C code...

Similar Threads

  1. Visual Studio App Wizard for Qt
    By joshlareau in forum Qt-based Software
    Replies: 4
    Last Post: 9th February 2007, 20:36
  2. Qt Cryptographic Architecture
    By vermarajeev in forum Qt Programming
    Replies: 6
    Last Post: 9th February 2007, 13:15
  3. problem with linking
    By mickey in forum Qt Programming
    Replies: 49
    Last Post: 12th August 2006, 21:41
  4. Qt Designer & Visual Studio 2005
    By pSiCho in forum Qt Tools
    Replies: 6
    Last Post: 9th February 2006, 13:40
  5. Where does VS save its inviornment vars?
    By high_flyer in forum Installation and Deployment
    Replies: 5
    Last Post: 4th February 2006, 10:10

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
  •  
Qt is a trademark of The Qt Company.