Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Can qt creator parse compiler commands to reslove includes (-Idir) or defines (-Dmacro) for Makefile based project?
Forum Updated to NodeBB v4.3 + New Features

Can qt creator parse compiler commands to reslove includes (-Idir) or defines (-Dmacro) for Makefile based project?

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
2 Posts 2 Posters 512 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.
  • xhpohankaX Offline
    xhpohankaX Offline
    xhpohanka
    wrote on last edited by
    #1

    Hello,
    the title describes whole my question. I'm trying to switch from Eclipse to qtcreator and I need to use the IDE for many Makefile projects.
    Is there any way to force qt creator to parse compiler commands and use the result to index the project?

    I'm aware about project.includes file, but it is not elegant solution for me...

    thanks
    Jan

    1 Reply Last reply
    0
    • R Offline
      R Offline
      rico-chet
      wrote on last edited by
      #2

      Well I think that qt creator just launches make and doesn't care about the gory details. Thus, it cannot access the build flags (which might vary from one source file to another anyway).
      You would need to expose them by the makefile somehow, e.g. I have a script for coreboot (a free software boot loader) which generates the DISTFILES, HEADERS and SOURCES sections for the configuration which is actually built. This isn't difficult because coreboot already has a facility in the makefile for generating list of files used during build (via compiler-generated dependency files as far as I remember).

      For the defines, there are special compiler switches which print list of built-in and user-provided defines, e.g. for GCC this would be gcc -dM -E. In case of a KConfig project like coreboot, the .config file is a good start too.

      For the include directories, I am still searching.

      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