Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. "missing separator" error in Makefile

"missing separator" error in Makefile

Scheduled Pinned Locked Moved General and Desktop
6 Posts 4 Posters 22.0k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    JaysonFix
    wrote on 16 Feb 2011, 14:44 last edited by
    #1

    Hi.

    I'm working my way through the Qt tutorial on qmake on my Windows XP machine.
    [The tutorial files are part of the distribution: C:\Qt\2010.05\qt\examples\qmake\tutorial].

    I've successfully used qmake to generate Makefile, Makefile.Debug, and Makefile.Release.
    [I used the command qmake -o Makefile hello.pro].

    I'm now trying to use mingw32-make.exe to build an executable, using the following command:
    C:\Qt\2010.05\mingw\bin\mingw32-make.exe

    However, I get the following error:
    @
    C:\Qt\2010.05\qt\examples\qmake\tutorial>C:\Qt\2010.05\mingw\bin\mingw32-make.exe
    C:/Qt/2010.05/mingw/bin/mingw32-make -f Makefile.Debug all
    mingw32-make[1]: Entering directory C:/Qt/2010.05/qt/examples/qmake/tutorial' Makefile.Debug:60: *** missing separator. Stop. mingw32-make[1]: Leaving directory C:/Qt/2010.05/qt/examples/qmake/tutorial'
    mingw32-make: *** [debug-all] Error 2
    @

    The relevant lines in my Makefile.Debug appear to be:

    @

    {.}.cpp{tmp\obj\debug_shared}.obj::
    $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fotmp\obj\debug_shared\ @<<
    $<
    <<

    @

    Thank you for any advice you can provide.

    Jayson

    1 Reply Last reply
    1
    • D Offline
      D Offline
      dangelog
      wrote on 16 Feb 2011, 16:18 last edited by
      #2
      1. Can you check if there a REAL TAB (i.e. '\t') before $(CXX) or $< and not just some spaces?
      2. Can you check if invoking the compiler by a relative path (or in general one that doesn't contain ':') the problem disappears? (like, ......\bin\mingw32-make ; or set PATH).

      Software Engineer
      KDAB (UK) Ltd., a KDAB Group company

      1 Reply Last reply
      0
      • J Offline
        J Offline
        JaysonFix
        wrote on 16 Feb 2011, 17:57 last edited by
        #3

        Thank you for your reply, peppe.

        There are real tabs before both $(CXX) and $<.

        After setting the PATH and invoking mingw32-make.exe (without a full path to it), the same error occurs at the same location in Makefile.Debug.

        1 Reply Last reply
        0
        • D Offline
          D Offline
          dangelog
          wrote on 16 Feb 2011, 19:14 last edited by
          #4

          That's weird. Can you pastebin the whole makefile?

          Software Engineer
          KDAB (UK) Ltd., a KDAB Group company

          1 Reply Last reply
          0
          • P Offline
            P Offline
            pamplemousse_mk2
            wrote on 9 Jun 2011, 12:32 last edited by
            #5

            Hello,

            I had the same problem, but succeed in fixing it now.

            I develop with Qt 4.6.3 on Win 7. My project was first written on Visual Studio. I have then installed MinGW.

            I have made several things to fix the problem:

            • QMAKESPEC: this env variable was not defined on my computer. Thus, qmake created the makefile for Visual Studio.
              I defined QMAKESPEC with the value %QTDIR%\mkspecs\win32-g++. Now the makefile is suitable for MinGW.

            • make.bat: I use getgnuwin32, which has its make.exe version, and conflicts with MinGW.
              In the bin directory of MinGW (c:\MinGW\bin for me), I created a file make.bat with these lines:

            @echo off
            mingw32-make %

            and I added the path of this directory in my PATH variable, before the directory of GetGnuWin32. In a new command line, the command which make returns the one of MinGW. At that point, building the Qt project works.

            I hope this will help someone.

            1 Reply Last reply
            1
            • B Offline
              B Offline
              BING.L
              wrote on 1 Dec 2022, 01:20 last edited by
              #6

              I see the same issue as the poster and finally resolved this issue withing the following way.

              The issue happened because the make spec is different with the way you generate the makefile.
              As I'm using the mingw32-make to make this QT project, the right makefile spec should be "win32-g++".

              So I re-generate the makefile using the following command:
              qmake -spec %YOUR_QTPATH%\mkspecs\win32-g++

              then, the issue shoule be resolved.

              1 Reply Last reply
              0

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved