8

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
Yu Hao
  • 119,891
  • 44
  • 235
  • 294
gizemdemirel
  • 377
  • 2
  • 4
  • 13

3 Answers3

14

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).

Jonathan Fischer
  • 515
  • 5
  • 10
  • You must specify "-platform ", where is any string that contains "win32-g++". That means "win64-g++" won't work but "win32-g++-4.6" will. See line 1380 of \Qt\4.8.5\tools\configure\configureapp.cpp. – JPaget Dec 17 '13 at 15:36
  • @JPaget where in the options screens can i check/change this ? – GuidoG Nov 27 '20 at 14:26
10

"Missing separator" almost always means you have a line that should begin with a tab that instead begins with a space.

William Pursell
  • 204,365
  • 48
  • 270
  • 300
0

If you'd actually shown us what was at line 61 of the Makefile.debug file, we could give you a better answer. "Missing separator" is make's version of "syntax error". It basically means make saw a line in the makefile that it couldn't figure out.

One reason could be, as William Pursell mentions, that you have spaces introducing your recipe lines but there are plenty of other reasons. Maybe you forgot the ":" between the target and prerequisite, or the "=" in a variable assignment. There are other possibilities.

MadScientist
  • 92,819
  • 9
  • 109
  • 136