[solved] qmake reports multiple targets and stops
-
I am working on Qt 5.1.0 with Qt creator 2.7.2 with minGW on windows7(sp1)
I tried to build the hello project from command line (C:\Qt\Qt5.1.0\5.1.0\mingw48_32\exaples\qmake\tutorial) as presicribed by the qmake manual.
I created hello.pro.
qmake -o Makefile hello.pro works fine.
But , "make" results in the following error,
**Makefile : 62: *multiple target patterns. stop
Thanks in advance for all your helps, Really appreciate your valuable time
Naveen C K
-
Hi and welcome to devnet,
Could you post your hello.pro ?
-
Thanks for replying so fast.
TARGET += helloworld
CONFIG += debug
HEADERS += hello.hSOURCES += hello.cpp
SOURCES += main.cppwin32 {
SOURCES += hellowin.cpp
}
unix {
SOURCES += hellounix.cpp
} -
I would add
@TEMPLATE = app@
-
Ok I will try and report back
-
I tried with the following hello.pro, unfortunately, problem still persists. I strongly appreciate your valuable suggestion sir.
new hello.pro is
TARGET += helloworld
CONFIG += debug
HEADERS += hello.hSOURCES += hello.cpp
SOURCES += main.cppTEMPLATE = app
win32 {
SOURCES += hellowin.cpp
}
unix {
SOURCES += hellounix.cpp
} -
Even this did not work.
TEMPLATE = app
TARGET += helloworld
CONFIG += debug
HEADERS += hello.hSOURCES += hello.cpp
SOURCES += main.cppwin32 {
SOURCES += hellowin.cpp
}
unix {
SOURCES += hellounix.cpp
} -
Could you just try that with QtCreator ?
-
Sure, On Qt creator , I created this project. It works.
-
I am reading through the book C++ GUI Programming with Qt 4, by Jasmin Blanchette and Mark Summerfield, where they have used qmake for compiling all the projects. So to follow the discussion in this book, I want to get command line compilation right.
-
Very good book ! Since you are following their tutorial, I would suggest to concentrate on the coding and understanding part first, then study the command line .
One of the goal of QtCreator is to make it easier to build projects. The windows command line is not the most programmer friendly thing.
-
Sir, In many places they are talking or mentioning about qmake compilation. As such it becomes difficult to imitate all the steps in QtCreator for a beginner like me.
I was watching Brians series of youtube lectures on C++ on Qt where he has used Qtcreator, all those I could reproduce in Qtceator. ( I watched some ten videos).
But, it looks very difficult to follow the book without the qmake. Hope you can help me out of this.
Or Please guide me, how I should repeat the qmake -project, qmake hello.pro and make steps in QtCreator without abandoning this beautiful and good book.
Hope I am not troubling you sir, too much.
-
please post your Makefile maybe we can see something there.
-
yes sir, I really appreciate your interest in the problem and the zeal to help the beginner.
Here is the Makefile for your kind perusal.
#############################################################################
Makefile for building: "hello helloworld"
Generated by qmake (3.0) (Qt 5.1.0) on: Wed 21. Aug 14:01:25 2013
Project: hello.pro
Template: app
Command: C:/Qt/Qt5.1.0/5.1.0/mingw48_32/bin/qmake.exe -o Makefile hello.pro
#############################################################################
MAKEFILE = Makefile
first: debug
install: debug-install
uninstall: debug-uninstall
QMAKE = C:/Qt/Qt5.1.0/5.1.0/mingw48_32/bin/qmake.exe
DEL_FILE = rm -f
CHK_DIR_EXISTS= test -d
MKDIR = mkdir -p
COPY = cp -f
COPY_FILE = cp -f
COPY_DIR = cp -f -R
INSTALL_FILE = cp -f
INSTALL_PROGRAM = cp -f
INSTALL_DIR = $(COPY_DIR)
DEL_FILE = rm -f
SYMLINK =
DEL_DIR = rmdir
MOVE = mv -f
SUBTARGETS =
debug
release -
Makefile continued......................................
debug: FORCE
$(MAKE) -f $(MAKEFILE).Debug
debug-make_first: FORCE
$(MAKE) -f $(MAKEFILE).Debug
debug-all: FORCE
$(MAKE) -f $(MAKEFILE).Debug all
debug-clean: FORCE
$(MAKE) -f $(MAKEFILE).Debug clean
debug-distclean: FORCE
$(MAKE) -f $(MAKEFILE).Debug distclean
debug-install: FORCE
$(MAKE) -f $(MAKEFILE).Debug install
debug-uninstall: FORCE
$(MAKE) -f $(MAKEFILE).Debug uninstall
release: FORCE
$(MAKE) -f $(MAKEFILE).Release
release-make_first: FORCE
$(MAKE) -f $(MAKEFILE).Release
release-all: FORCE
$(MAKE) -f $(MAKEFILE).Release all
release-clean: FORCE
$(MAKE) -f $(MAKEFILE).Release clean
release-distclean: FORCE
$(MAKE) -f $(MAKEFILE).Release distclean
release-install: FORCE
$(MAKE) -f $(MAKEFILE).Release install
release-uninstall: FORCE
$(MAKE) -f $(MAKEFILE).Release uninstallMakefile: hello.pro C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/win32-g++/qmake.conf C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/features/spec_pre.prf
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/qdevice.pri
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/features/device_config.prf
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/common/shell-unix.conf
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/qconfig.pri
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/modules/qt_lib_axbase.pri
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/modules/qt_lib_axcontainer.pri
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/modules/qt_lib_axserver.pri
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/modules/qt_lib_bootstrap.pri
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/modules/qt_lib_clucene.pri
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/modules/qt_lib_concurrent.pri
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/modules/qt_lib_core.pri
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/modules/qt_lib_declarative.pri
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/modules/qt_lib_designer.pri
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/modules/qt_lib_designercomponents.pri
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/modules/qt_lib_gui.pri
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/modules/qt_lib_help.pri
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/modules/qt_lib_multimedia.pri
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/modules/qt_lib_multimediawidgets.pri
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/modules/qt_lib_network.pri
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/modules/qt_lib_opengl.pri
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/modules/qt_lib_openglextensions.pri
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/modules/qt_lib_platformsupport.pri
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/modules/qt_lib_printsupport.pri
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/modules/qt_lib_qml.pri
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/modules/qt_lib_qmldevtools.pri
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/modules/qt_lib_qmltest.pri
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/modules/qt_lib_qtmultimediaquicktools.pri
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/modules/qt_lib_quick.pri
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/modules/qt_lib_quickparticles.pri
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/modules/qt_lib_script.pri
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/modules/qt_lib_scripttools.pri
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/modules/qt_lib_sensors.pri
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/modules/qt_lib_serialport.pri
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/modules/qt_lib_sql.pri
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/modules/qt_lib_svg.pri
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/modules/qt_lib_testlib.pri
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/modules/qt_lib_uitools.pri
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/modules/qt_lib_v8.pri
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/modules/qt_lib_webkit.pri
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/modules/qt_lib_webkitwidgets.pri
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/modules/qt_lib_widgets.pri
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/modules/qt_lib_xml.pri
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/modules/qt_lib_xmlpatterns.pri
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/features/qt_functions.prf
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/features/qt_config.prf
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/win32-g++/qmake.conf
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/features/spec_post.prf
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/features/exclusive_builds.prf
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/features/default_pre.prf
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/features/win32/default_pre.prf
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/features/resolve_config.prf
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/features/default_post.prf
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/features/win32/rtti.prf
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/features/warn_on.prf
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/features/qt.prf
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/features/resources.prf
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/features/moc.prf
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/features/win32/opengl.prf
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/features/win32/windows.prf
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/features/testcase_targets.prf
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/features/exceptions.prf
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/features/yacc.prf
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/features/lex.prf \ -
Makefile continued..............................
hello.pro
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/lib/Qt5Gui.prl
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/lib/Qt5Core.prl
$(QMAKE) -o Makefile hello.pro
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/features/spec_pre.prf:
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/qdevice.pri:
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/features/device_config.prf:
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/common/shell-unix.conf:
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/qconfig.pri:
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/modules/qt_lib_axbase.pri:
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/modules/qt_lib_axcontainer.pri:
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/modules/qt_lib_axserver.pri:
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/modules/qt_lib_bootstrap.pri:
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/modules/qt_lib_clucene.pri:
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/modules/qt_lib_concurrent.pri:
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/modules/qt_lib_core.pri:
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/modules/qt_lib_declarative.pri:
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/modules/qt_lib_designer.pri:
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/modules/qt_lib_designercomponents.pri:
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/modules/qt_lib_gui.pri:
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/modules/qt_lib_help.pri:
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/modules/qt_lib_multimedia.pri:
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/modules/qt_lib_multimediawidgets.pri:
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/modules/qt_lib_network.pri:
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/modules/qt_lib_opengl.pri:
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/modules/qt_lib_openglextensions.pri:
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/modules/qt_lib_platformsupport.pri:
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/modules/qt_lib_printsupport.pri:
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/modules/qt_lib_qml.pri:
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/modules/qt_lib_qmldevtools.pri:
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/modules/qt_lib_qmltest.pri:
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/modules/qt_lib_qtmultimediaquicktools.pri:
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/modules/qt_lib_quick.pri:
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/modules/qt_lib_quickparticles.pri:
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/modules/qt_lib_script.pri:
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/modules/qt_lib_scripttools.pri:
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/modules/qt_lib_sensors.pri:
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/modules/qt_lib_serialport.pri:
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/modules/qt_lib_sql.pri:
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/modules/qt_lib_svg.pri:
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/modules/qt_lib_testlib.pri:
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/modules/qt_lib_uitools.pri:
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/modules/qt_lib_v8.pri:
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/modules/qt_lib_webkit.pri:
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/modules/qt_lib_webkitwidgets.pri:
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/modules/qt_lib_widgets.pri:
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/modules/qt_lib_xml.pri:
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/modules/qt_lib_xmlpatterns.pri:
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/features/qt_functions.prf:
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/features/qt_config.prf:
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/win32-g++/qmake.conf:
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/features/spec_post.prf:
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/features/exclusive_builds.prf:
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/features/default_pre.prf:
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/features/win32/default_pre.prf:
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/features/resolve_config.prf:
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/features/default_post.prf:
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/features/win32/rtti.prf:
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/features/warn_on.prf:
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/features/qt.prf:
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/features/resources.prf:
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/features/moc.prf:
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/features/win32/opengl.prf:
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/features/win32/windows.prf:
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/features/testcase_targets.prf:
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/features/exceptions.prf:
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/features/yacc.prf:
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/features/lex.prf:
hello.pro:
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/lib/Qt5Gui.prl:
C:/Qt/Qt5.1.0/5.1.0/mingw48_32/lib/Qt5Core.prl:
qmake: FORCE
@$(QMAKE) -o Makefile hello.proqmake_all: FORCE
make_first: debug-make_first release-make_first FORCE
all: debug-all release-all FORCE
clean: debug-clean release-clean FORCE
distclean: debug-distclean release-distclean FORCE
-$(DEL_FILE) Makefiledebug-mocclean:
$(MAKE) -f $(MAKEFILE).Debug mocclean
release-mocclean:
$(MAKE) -f $(MAKEFILE).Release mocclean
mocclean: debug-mocclean release-moccleandebug-mocables:
$(MAKE) -f $(MAKEFILE).Debug mocables
release-mocables:
$(MAKE) -f $(MAKEFILE).Release mocables
mocables: debug-mocables release-mocablescheck: first
FORCE:$(MAKEFILE).Debug: Makefile
$(MAKEFILE).Release: Makefile -
-------------That is the Makefile.
-
if i reconstructed these parts correctly i can't see any rules around line 62 in your makefile.
How do you call the Makefile ... how does your make call look like?
-
Sorry, may be because of cutting the file into three pieces it is like that,
here is the line number 62 of the Makefile:
Makefile: hello.pro C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/win32-g++/qmake.conf C:/Qt/Qt5.1.0/5.1.0/mingw48_32/mkspecs/features/spec_pre.prf \
In single line
-
Hello friends,
I uninstalled Qt5.1.0 from my machine and installed Qt 4.8.4 using
qt-win-opensource-4.8.4-mingw.exe installer.Now the qmake and make are working, and the hello.exe is created in the debug directory.
Unfortunately the hello.exe is not running due to many missing dll files.
I downloaded many all the dll files files one by one as it reported and copied into C:/Windows/system32 directory. Now I am getting an error like procedure entry point BLAH BLAH BLAH could not located in QtCored4.dll. How to rectify such errors?. Can reinstalling Windows7 solve the problem?
Question : Something may be wrong with the Qt5.1.0 qmake?
7/26