Missing Separator Error in Makefile

gizemdemirel picture gizemdemirel · May 4, 2012 · Viewed 13.2k times · Source

I am working on Qt 4.7.2 on Windows. I have generated Makefile, Makefile.Debug and Makefile.Release. However, when I try to use mingw32-make to build an executable, I get the following error:

mingw32-make -f Makefile.Debug all
mingw32-make[1]: Entering directory `C:/Qt/4.7.2/src/plugins/sqldrivers/mysql'
Makefile.Debug:61: *** missing separator.  Stop.
mingw32-make[1]: Leaving directory `C:/Qt/4.7.2/src/plugins/sqldrivers/mysql'
mingw32-make: *** [debug-all] Error 2

Answer

Jonathan Fischer picture Jonathan Fischer · Dec 1, 2012

Obviously this answer is late, but I'm answering it for posterity... this hit me today.

Frank Osterfeld almost certainly had it right. Not sure how you generated the makefiles, but they're probably nmake makefiles, not mingw makefiles. You can tell by looking at the top of Makefile.Debug. If you see "CXX = cl", not "CXX = g++", then that's your problem.

In my case, I hit this error when trying to compile the Qt SDK itself. Long story short: I needed to specify "-platform win32-g++" on the configure command line (it defaulted to win32-msvc).