[SOLVED] qmake's dir-separator incompatible with vanilla mingw32-make?
-
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 sourceforge.net). 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"
Questions:
Is this a bug in the latest mingw32-make?
Was the QtSDK's version of mingw32-make modified?
Has anyone else encountered this?
Thanks!
-
Please use '/' as path separators in qmake (and for Qt's C++ classes that require pathes).
-
[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.
-
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.
-
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
-
Turns out that the separator was disappearing due to a bug in mingw32-make. It's fixed in "today's release":http://sourceforge.net/projects/mingw/files/MinGW/Extension/make/make-3.82.90-cvs/