Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Create object (.o) files in the same folder as source
Forum Updated to NodeBB v4.3 + New Features

Create object (.o) files in the same folder as source

Scheduled Pinned Locked Moved Installation and Deployment
2 Posts 2 Posters 1.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.
  • A Offline
    A Offline
    alb3530
    wrote on last edited by
    #1

    In the project I'm actually trying to compile, there's a physical folder structure like this one:

    abc.c
    misc.c
    xyz.c
    tools\misc.c

    As you can see, there are two files called misc.c, but they are in different folders, then it shouldn't be a problem really.

    However, at objects creation, the compile creates both misc.o in the same folder (release).The problem lies in the fact the first misc.o (source dir\misc.c) is replaced by the second misc.o (source dir\tools\misc.c).

    The project is actually quite complex, in a way there's more than one file in the same situation, then what I need is a way to instruct Qmake to create the .o files in the same folder as their sources (Foe me, it should happen by default).That way, I would have the misc.o files created in their corresponding folders:

    source dir\release\misc.o

    and

    source dir\release\tools\misc.o

    Is there a way to do this on Qmake without having to rename the original files one by one?

    Best regards

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      Not exactly what you want, but you might go for qmake subdirs template (check out Qt sources to get an idea of what it is about). I think this would solve your problem (but will also require some work in redesigning qmake projects).

      (Z(:^

      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