Important: Please read the Qt Code of Conduct -

[SOLVED] qmake's dir-separator incompatible with vanilla mingw32-make?

  • Moderators

    EDIT: It was a bug in mingw32-make. They've released a fixed version on 2 September 2012.

    Hi all, I bit the bullet and leapt from QtSDK 1.2.1 to the manually-installed Qt 4.8.2 + Qt Creator 2.5. I configured it to use the latest MinGW toolchain (from Problem: Makefile.debug, generated by qmake, contains this line...
    DESTDIR_TARGET = debug\myapp.exe

    ... which causes Make to trip over:
    mingw32-make[1]: *** No rule to make target 'debugmyapp.exe', needed by 'all'. Stop.

    The separator got swallowed up! These 2 workarounds let my project compile successfully:

    I replace my version of mingw32-make (GNU Make 3.82.90) with the version bundled with QtSDK (GNU Make 3.81), OR

    I modify the separator in Makefile.debug: "DESTDIR_TARGET = debug/myapp.exe"


    Is this a bug in the latest mingw32-make?

    Was the QtSDK's version of mingw32-make modified?

    Has anyone else encountered this?


  • Moderators

    Please use '/' as path separators in qmake (and for Qt's C++ classes that require pathes).

  • Moderators

    [quote author="Tobias Hunger" date="1346491265"]Please use '/' as path separators in qmake (and for Qt's C++ classes that require pathes).[/quote]Hi Tobias,

    I did not manually pass any paths into qmake. All path configurations were either auto-detected from my system environment, or "browsed to" from Qt Creator's GUI. My .pro file and source code contained no path separators.

    qmake was the one that produced the '' separator in my Makefile.

  • Moderators

    Oh, right... IIRC there was something about needing a different kind of makefile for mingw make and msvc make. Sorry, I can't help more, Windows is just too messy to work on for my taste:-)

    Edit: You could try passing "-unix" to qmake when running it.

  • Moderators

    That's ok, thanks for your suggestions :)

    "-unix" does create a Makefile with '/' separators, which fixes compilation, but breaks the ability to CLEAN the project. Also, qmake complains that "-unix is deprecated".

    I guess I'll stick to the mingw32-make that I transplanted from QtSDK for now

  • Moderators

    Turns out that the separator was disappearing due to a bug in mingw32-make. It's fixed in "today's release":

Log in to reply