Results 1 to 8 of 8

Thread: Incorrect Makefile generated

  1. #1
    Join Date
    Nov 2010
    Posts
    20
    Thanks
    1
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Incorrect Makefile generated

    Hello,

    I'm on Windows using the new Beta Qt SDK (Qt 4.7.2), with MinGW.

    I tried creating a new GUI Application on creator (with a .ui file).

    I modified a little bit the .pro file, putting :

    Qt Code:
    1. CONFIG -= warn_on warn_off release debug debug_and_release
    2. CONFIG *= qt warn_on release
    To copy to clipboard, switch view to plain text mode 

    when compiling, I get :

    process_begin: CreateProcess(NULL, c:\Qt\Desktop\Qt\4.7.2\mingw\binuic.exe ..\qmaketest\mainwindow.ui -o ui_mainwindow.h, ...) failed.

    As you can see, make is trying to invoke the incorrect uic binary (binuic.exe instead of bin\uic.exe). I fixed this issue by removing debug_and_release from the first line.

    However, I can't figure out why qmake is generating an incorrect makefile (the DIR_SEPARAOR seems to be empty). I also tried with Qt 4.7.0, same issue.

    It is working fine on Linux & Mac. QMake Windows bug I guess ?

  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: Incorrect Makefile generated

    You could have a look inside the QTDIR/mkspecs directory to see if the separator is set up correctly.
    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.


  3. #3
    Join Date
    Nov 2010
    Posts
    20
    Thanks
    1
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Incorrect Makefile generated

    I already did.

    However, it's working when removing debug_and_release from
    Qt Code:
    1. CONFIG -= ...
    To copy to clipboard, switch view to plain text mode 

    That's why I'm wondering if it's a qmake bug or ... (since it's woking on Linux & Mac OS).

  4. #4
    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: Incorrect Makefile generated

    Can we see the whole project file?
    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.


  5. #5
    Join Date
    Nov 2010
    Posts
    20
    Thanks
    1
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Incorrect Makefile generated

    sure, really simple :

    Qt Code:
    1. QT += core gui
    2.  
    3. TARGET = qmaketest
    4. TEMPLATE = app
    5.  
    6. CONFIG -= debug_and_release
    7. CONFIG *= qt warn_on release
    8.  
    9.  
    10. SOURCES += main.cpp\
    11. mainwindow.cpp
    12.  
    13. HEADERS += mainwindow.h
    14.  
    15. FORMS += mainwindow.ui
    To copy to clipboard, switch view to plain text mode 

    just a basic .pro generated by Qt Creator in which I added the two CONFIG lines. Removing or commenting the first CONFIG line makes the application compile. Otherwise, I get :

    process_begin: CreateProcess(NULL, c:\Qt\Desktop\Qt\4.7.2\mingw\binuic.exe ..\qmaketest\mainwindow.ui -o ui_mainwindow.h, ...) failed.
    where a '\' is missing. I really don't get it :/

  6. #6
    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: Incorrect Makefile generated

    What if you change the relevant two lines to:
    qmake Code:
    1. CONFIG += release
    To copy to clipboard, switch view to plain text mode 
    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.


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

    Octal (19th March 2011)

  8. #7
    Join Date
    Nov 2010
    Posts
    20
    Thanks
    1
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Incorrect Makefile generated

    It is indeed working, but now if you try :

    Qt Code:
    1. CONFIG += release
    2.  
    3. CONFIG(debug, debug|release) {
    4. message("Debug")
    5. } else {
    6. message("Release")
    7. }
    To copy to clipboard, switch view to plain text mode 

    You'll get "Release" 3 times.

    Anyway, thank you for your help, I think it's a bug on qmake. I'll report it

  9. #8
    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: Incorrect Makefile generated

    Quote Originally Posted by Octal View Post
    You'll get "Release" 3 times.
    On Windows you always get such messages three times. What's relevant is that the "release" part of the project file is the active one.
    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. Incorrect Julian Day
    By Rayven in forum Qt Programming
    Replies: 6
    Last Post: 16th November 2011, 14:10
  2. Replies: 1
    Last Post: 31st March 2011, 19:38
  3. Incorrect position of QPushButton on mac
    By francis in forum Qt Programming
    Replies: 4
    Last Post: 1st March 2011, 18:34
  4. qt installation - no makefile generated
    By arjoshi in forum Newbie
    Replies: 1
    Last Post: 6th December 2010, 02:03
  5. Replies: 0
    Last Post: 12th October 2010, 05:14

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.