warning: duplicate script for target
Hi, guys.
I’m trying to build my project, but getting this error.
- "Makefile", line 353: warning: duplicate script for target ".obj/Language.o" ignored
- "Makefile", line 356: warning: duplicate script for target ".obj/Procedure.o" ignored
The truth is, I have several files Language.{cpp,h} and Procedure.{cpp,h} under different directories. And these files are different. And as I understand this conflict causes the above error.
My question is: Is there any way to make qmake handle this issue? Or I will have to rename some of these files in order to avoid name duplication?
2 replies
Thanks, Denis. What I’m trying to build now (this is actually a static lib) is already a part of SUBDIRS type .pro file. I thought about making the lib’s top .pro file with SUBDIRS template, and putting a separate .pro file in all nested directories with OBJECTS_DIR overridden for each directory, so that object files do not conflict. I will keep this solution in mind.
To my point view, the best solution would be making qmake create the same directory structure under specified OBJECTS_DIR. I mean, let say we have
- OBJECTS_DIR = .obj
- SOURCES = Type1/*.cpp \
- Type2/*.cpp
and it will be just great, if qmake creates .obj, .obj/Type1, .obj/Type2 directories and puts .o files according to their location. Is this possible?
You must log in to post a reply. Not a member yet? Register here!


