Results 1 to 16 of 16

Thread: cannot compile Windows Platform SDK code with QtCreator and mingw

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,373
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    3
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: cannot compile Windows Platform SDK code with QtCreator and mingw

    Quote Originally Posted by kompotFX View Post
    in build settings the Tool chain filed is MinGW and its grey colour not editable. How to change it?
    If you want to use Qt then you have to have Qt built for MSVC (either from binary if available or built yourself). Then qmake should already be set up for MSVC. If you don't need Qt then you need to tell qmake to use the proper specs (win32-msvc<something>) by adjusting the build steps (you need to pass a -specs parameter with appropriate argument).
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  2. #2
    Join Date
    Jan 2009
    Posts
    19
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: cannot compile Windows Platform SDK code with QtCreator and mingw

    Quote Originally Posted by wysota View Post
    If you want to use Qt then you have to have Qt built for MSVC (either from binary if available or built yourself). Then qmake should already be set up for MSVC. If you don't need Qt then you need to tell qmake to use the proper specs (win32-msvc<something>) by adjusting the build steps (you need to pass a -specs parameter with appropriate argument).
    I have installed both:
    Qt libraries 4.7.0 for Windows (VS 2008, 226 MB)
    Qt SDK for Windows* (322 MB) - this comes with QtCreator and mingw
    (*Based on MinGW (download sources) tool set. Does not support VS compiler.)

    In QtCreator I open Tools - Options - Qt4 - Qt versions tab.
    There is c:\qt\2010.05\qt\bin\qmake.exe as autodetected version (which is Qt SDK for Windows installation).
    When I try to add 4.7.0 qmake for VS2008 it is message in bottom of settings window telling me "Qt version is not properly installed, please run make install". However Qt library 4.7.0 for Windows is properly installed and I able to build current project using Visual Studio without any problems. What should I do to make it recognisable by QtCreator? I just guess it is LGPL license restrictions not to use msvc stuff in QtCreator. Or am I wrong?

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

    Default Re: cannot compile Windows Platform SDK code with QtCreator and mingw

    The licence has nothing to do with it.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  4. #4
    Join Date
    Jan 2009
    Posts
    19
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: cannot compile Windows Platform SDK code with QtCreator and mingw

    Quote Originally Posted by wysota
    As already said it is not glued to anything. It supports everything qmake or cmake support, msvc included.
    Quote Originally Posted by wysota
    If you want to use Qt then you have to have Qt built for MSVC (either from binary if available or built yourself). Then qmake should already be set up for MSVC. If you don't need Qt then you need to tell qmake to use the proper specs (win32-msvc<something>) by adjusting the build steps (you need to pass a -specs parameter with appropriate argument).
    Quote Originally Posted by wysota View Post
    The licence has nothing to do with it.
    Actually I dont care so much about if it is license or something else to do with it. You are telling me that QtCreator not glued to mingw, so logically I assume it is possible to setup it to use Qt built for msvc and trigger msvc compiler to build the code etc..
    Can you tell me exactly, how to do this? Step-by-step if it is possible or at least be more speciffic?

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

    Default Re: cannot compile Windows Platform SDK code with QtCreator and mingw

    I can try (although I've never done it myself) but please tell me what is unclear in what I explained in post #10. Did you find where to adjust the build steps in Creator?

    I can tell you the simplest way to do it is to run Qt Creator when qmake built for Visual Studio is the first qmake in the PATH - then you shouldn't need to adjust anything - Creator should pick up the appropriate configuration itself. At least it was so for one of the previous versions of Creator but I suspect nothing has changed in this regard.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  6. #6
    Join Date
    Jan 2009
    Posts
    19
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: cannot compile Windows Platform SDK code with QtCreator and mingw

    Quote Originally Posted by wysota View Post
    I can try (although I've never done it myself) but please tell me what is unclear in what I explained in post #10. Did you find where to adjust the build steps in Creator?

    I can tell you the simplest way to do it is to run Qt Creator when qmake built for Visual Studio is the first qmake in the PATH - then you shouldn't need to adjust anything - Creator should pick up the appropriate configuration itself. At least it was so for one of the previous versions of Creator but I suspect nothing has changed in this regard.
    I can repeat step by step what I do:
    I have installed both:
    Qt libraries 4.7.0 for Windows (VS 2008, 226 MB)
    Qt SDK for Windows* (322 MB) - this comes with QtCreator and mingw
    (*Based on MinGW (download sources) tool set. Does not support VS compiler.)

    In QtCreator I open Tools - Options - Qt4 - Qt versions tab.
    There is c:\qt\2010.05\qt\bin\qmake.exe as autodetected version (which is Qt SDK for Windows installation).
    When I try to add 4.7.0 qmake for VS2008 it is message in bottom of settings window telling me "Qt version is not properly installed, please run make install". However Qt library 4.7.0 for Windows is properly installed and I able to build current project using Visual Studio without any problems. What should I do to make it recognisable by QtCreator?
    Do you have QtCreator in front of you? Windows? Have Qt libraries 4.7.0 for Windows (VS 2008, 226 MB) installed? Than probably it should be not problem for you to explain which settigng window I have to open and what to write/select there.

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

    Default Re: cannot compile Windows Platform SDK code with QtCreator and mingw

    No, I don't have Windows in front of me now and I'm using a slightly newer version of Creator than you do but this shouldn't be a problem. Open your project and switch to the "projects" pane where you will find the build settings and build steps. The first build step is the qmake step which you need to adjust by passing a different argument (win32-msvc2008) to the -spec parameter. Then try building the project. If that doesn't work then close Qt Creator, launch "Qt command prompt" for the MSVC-enabled version of Qt and launch Creator from this commandline. Then make sure the Qt versions tab has a "Qt in PATH" entry pointing to your Qt installation and build the project.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Replies: 4
    Last Post: 11th August 2011, 08:02
  2. using GLUT along with qtcreator/mingw in windows
    By stephanepoirier in forum Qt Programming
    Replies: 1
    Last Post: 3rd March 2009, 05:26
  3. Shadow build QT for the win32-g++ (MinGw) platform.
    By Avrohom in forum Installation and Deployment
    Replies: 0
    Last Post: 20th January 2009, 23:10
  4. Replies: 4
    Last Post: 29th December 2007, 01:27
  5. Cross compile QT/X11 for platform xscale-elf
    By nmkarvekar in forum Installation and Deployment
    Replies: 0
    Last Post: 19th May 2006, 07:20

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.