PDA

View Full Version : Multiple target patterns in Makefile



mea36
7th November 2006, 18:11
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

jacek
7th November 2006, 22:16
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?

wysota
7th November 2006, 22:21
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).

mea36
9th November 2006, 21:00
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.

jacek
9th November 2006, 21:09
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++"?

mea36
9th November 2006, 22:39
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.

jacek
10th November 2006, 00:09
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++?

mea36
14th November 2006, 16:34
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

wysota
14th November 2006, 16:37
No, it doesn't. As I have written above, it only supports MSVC and Borland compilers.

mea36
14th November 2006, 19:39
o, Thanks. Sorry I didn't notice that before. So what can/do I do now?

wysota
14th November 2006, 23:47
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.

mea36
15th November 2006, 00:39
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?

wysota
15th November 2006, 07:47
I don't know, maybe MinGW is binary compatible with Borland?