Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Problem with Qmake generated Makefile
QtWS25 Last Chance

Problem with Qmake generated Makefile

Scheduled Pinned Locked Moved Installation and Deployment
7 Posts 2 Posters 2.7k 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.
  • E Offline
    E Offline
    elaksana
    wrote on last edited by
    #1

    Hello! New to QT here. I just got everything installed yesterday, made a short test file, and ran qmake -project. When I tried using the "make" command, however, my terminal produced this error:

    Makefile:66: *** multiple target patterns. Stop.

    I'm currently running windows 8 and installed QT version 4.8. Thanks in advance for the help!

    1 Reply Last reply
    0
    • JKSHJ Offline
      JKSHJ Offline
      JKSH
      Moderators
      wrote on last edited by
      #2

      Hi, and welcome to the Qt Dev Net!

      If you are new to Qt, I highly recommend starting with Qt 5.2.1. Qt 4.8 is very old, and is no longer actively developed. The Qt 5.2.1 packages include the Qt Creator IDE, so you don't need to call qmake manually.

      But anyway, what files did you ask qmake to process? If you use the "-project" flag, qmake produces a .pro file, not a Makefile.

      Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

      1 Reply Last reply
      0
      • E Offline
        E Offline
        elaksana
        wrote on last edited by
        #3

        Hello, and thank you for your reply!

        I will try 5.2.1 on a different machine, but I would like to try getting 4.8 working on this one. I used the qmake -project to create the .pro file and called qmake after the .pro was generated. Here is the code that I was trying to compile:

        #include <QApplication>
        #include <QPushButton>

        int main(int argc, char *argv[])
        {
        QApplication app(argc, argv);
        QPushButton button("Hello world!");

        button.show();
        return app.exec();
        }

        1 Reply Last reply
        0
        • JKSHJ Offline
          JKSHJ Offline
          JKSH
          Moderators
          wrote on last edited by
          #4

          Can you post the contents of your .pro file?

          You might also consider installing the standalone Qt Creator 3.0 to handle qmake for you. If it doesn't auto-detect your tools...

          See "Adding Compilers":http://qt-project.org/doc/qtcreator-3.0/creator-tool-chains.html to tell Qt Creator where to find your compiler

          See "Adding Qt Versions":http://qt-project.org/doc/qtcreator-3.0/creator-project-qmake.html to tell Qt Creator where to find the Qt binaries

          Finally, see "Adding Kits":http://qt-project.org/doc/qtcreator-3.0/creator-targets.html to tell Qt Creator how to combine your toolchain with the Qt binaries.

          Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

          1 Reply Last reply
          0
          • E Offline
            E Offline
            elaksana
            wrote on last edited by
            #5

            ######################################################################

            Automatically generated by qmake (2.01a) Sat Mar 8 05:52:33 2014

            ######################################################################

            TEMPLATE = app
            TARGET =
            DEPENDPATH += .
            INCLUDEPATH += .

            Input

            SOURCES += qt_test.cpp

            1 Reply Last reply
            0
            • JKSHJ Offline
              JKSHJ Offline
              JKSH
              Moderators
              wrote on last edited by
              #6

              The .pro file might be incomplete. According to https://qt-project.org/forums/viewthread/7487 you are expected to hand-modify the output of qmake -project. Try this:

              Add this line to the end of the .pro file: "QT += core gui"

              Add a name to "TARGET" (this will be your executable file name)

              Again, I recommend setting up new projects through Qt Creator.

              Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

              1 Reply Last reply
              0
              • E Offline
                E Offline
                elaksana
                wrote on last edited by
                #7

                Just got it working! Apparently I was using a cygwin version of make, as opposed to mingw32-make. Thanks so much for your help!

                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