Results 1 to 13 of 13

Thread: Multiple target patterns in Makefile

  1. #1
    Join Date
    Nov 2006
    Posts
    6
    Qt products
    Qt3
    Platforms
    Windows

    Default Multiple target patterns in Makefile

    Hi,
    I am trying to run a simple hello world program and when I try to make the .pro file I get the error:
    Makefile:92: *** multiple target patterns. Stop.

    Line 92 of my Makefile is:
    Makefile: hello2.pro C:\Qt\3.2.1NonCommercial\mkspecs\cygwin-g++\qmake.conf

    I am using cygwin.
    Does anyone know what I should do?

    -Melissa

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Multiple target patterns in Makefile

    Quote Originally Posted by mea36 View Post
    Makefile: hello2.pro C:\Qt\3.2.1NonCommercial\mkspecs\cygwin-g++\qmake.conf
    I think that the problem is that your Makefile contains a windows paths, not Unix ones and Cygwin's make gets confused.

    I'm not sure if Qt 3.2.1 non-commercial can be used with Cygwin. Maybe you should try normal windows command prompt --- cmd.exe?

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Multiple target patterns in Makefile

    Quote Originally Posted by jacek View Post
    I'm not sure if Qt 3.2.1 non-commercial can be used with Cygwin.
    AFAIR 3.2.1NC supports only MSVC and Borland compilers. I think g++ won't be able to (at least) link with the library produced for MSVC or Borland (there are two distinct versions - each for one of the compiler families).

  4. #4
    Join Date
    Nov 2006
    Posts
    6
    Qt products
    Qt3
    Platforms
    Windows

    Default Re: Multiple target patterns in Makefile

    My orignal problem was that qmake couldn't read QMAKESPEC conf file:
    $ qmake hello.pro
    Failure to read QMAKESPEC conf file /usr/lib/qt3/mkspecs/cygwin-g++\qmake.conf.
    Error processing project file: C:/cygwin/home/Melissa Aaron/opengl/hello/hello.pro

    So I then set QMAKESPEC to equal "C:/Qt/3.2.1NonCommercial/mkspecs/cygwin-g++"

    If I do that then $qmake hello.pro doesn't give me any errors, but $make gives me the multiple target patterns error.

  5. #5
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Multiple target patterns in Makefile

    Quote Originally Posted by mea36 View Post
    So I then set QMAKESPEC to equal "C:/Qt/3.2.1NonCommercial/mkspecs/cygwin-g++"
    Maybe you should try "/c/Qt/3.2.1NonCommercial/mkspecs/cygwin-g++"?

  6. #6
    Join Date
    Nov 2006
    Posts
    6
    Qt products
    Qt3
    Platforms
    Windows

    Default Re: Multiple target patterns in Makefile

    No, That doesn't work either. It's that backslash and I don't know what to do about it.
    Do you know if there's anyway to change that backslash?
    And thanks for your help.

  7. #7
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Multiple target patterns in Makefile

    Quote Originally Posted by mea36 View Post
    Do you know if there's anyway to change that backslash?
    I'm afraid that if qmake insists on putting that backslash there, it might not be suitable for use with Cygwin. Are you sure that the Qt version you have supports g++?

  8. #8
    Join Date
    Nov 2006
    Posts
    6
    Qt products
    Qt3
    Platforms
    Windows

    Default Re: Multiple target patterns in Makefile

    Quote Originally Posted by jacek View Post
    I'm afraid that if qmake insists on putting that backslash there, it might not be suitable for use with Cygwin. Are you sure that the Qt version you have supports g++?
    I don't know if it supports g++. I'm using version 3.3.4-2

  9. #9
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Multiple target patterns in Makefile

    No, it doesn't. As I have written above, it only supports MSVC and Borland compilers.

  10. #10
    Join Date
    Nov 2006
    Posts
    6
    Qt products
    Qt3
    Platforms
    Windows

    Default Re: Multiple target patterns in Makefile

    o, Thanks. Sorry I didn't notice that before. So what can/do I do now?
    Last edited by mea36; 14th November 2006 at 20:15.

  11. #11
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Multiple target patterns in Makefile

    Switch compilers or switch Qt versions. If you insist on using 3.2.1NC, then you should be able to compile applications with the MSVC version available on Microsoft website (it's called Express or something like that). An alternative is to switch to Qt4.

  12. #12
    Join Date
    Nov 2006
    Posts
    6
    Qt products
    Qt3
    Platforms
    Windows

    Default Re: Multiple target patterns in Makefile

    Actually, now that I think about it... initially I was able to get it working. And then I tried to recomplie the code and thats when I began to run into all the errors. So how can g++ be uncompatible if I was able to make it work?

  13. #13
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Multiple target patterns in Makefile

    I don't know, maybe MinGW is binary compatible with Borland?

Similar Threads

  1. Qtopia host side development environment for ARM target.
    By hvreddy1110 in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 11th October 2006, 15:05
  2. how to corss compile for windows in Linux
    By safknw in forum Qt Programming
    Replies: 24
    Last Post: 13th May 2006, 05:23
  3. Replies: 5
    Last Post: 13th March 2006, 20:22
  4. Problem with a makefile
    By Tweety in forum Qt Programming
    Replies: 16
    Last Post: 15th February 2006, 19:34

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.