Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Warning: duplicate script for target
Forum Updated to NodeBB v4.3 + New Features

Warning: duplicate script for target

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 3.5k Views 1 Watching
  • 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.
  • L Offline
    L Offline
    lyuts
    wrote on last edited by
    #1

    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?

    I'm a rebel in the S.D.G.

    1 Reply Last reply
    0
    • D Offline
      D Offline
      DenisKormalev
      wrote on last edited by
      #2

      Maybe you can move them to SUBDIRS type of .pro file with staticaly linkage between them? It can help you. In this case each directory will be built into .a file (static library) and after it you can link them all into one executable.

      1 Reply Last reply
      0
      • L Offline
        L Offline
        lyuts
        wrote on last edited by
        #3

        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?

        I'm a rebel in the S.D.G.

        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