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. QtCreator temporarily adds additional include paths?
QtWS25 Last Chance

QtCreator temporarily adds additional include paths?

Scheduled Pinned Locked Moved Qt Creator and other tools
4 Posts 2 Posters 1.5k Views
  • 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.
  • S Offline
    S Offline
    sl.sy.ifm
    wrote on last edited by
    #1

    In a project with multiple developers and a CI-Server we saw some strange behavior.
    It seems when adding files within QtCreator, it injects some include-path into the build like having the project-root-dir added as include-path. (which tempt some developer to write/commit wrong includes)
    When building the qmake-project without QtCreator (e.g. on our CI) it then doesn't have this additional includepath.

    This sometimes screws up the test-build before checkin, as it builds well via QtCreator.
    ... and the CI gets broken at least once a week by this.

    It probably only is visible because we don't have the project-root-dirs as includepath within the sub-projects.
    (so, workaround would be to add them to the qmake ...)

    Has someone experienced some similar behavior?
    Or even knows why/where QtCreator injects the additional includepath?

    (I know that this would also fit into the bugtracker ... but I preferred to understand it first, before calling it a bug)

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

      This is expected. Qt Creator is doing all it can to run your applications smoothly and without errors. This means it is modifying the environment. You can check everything in Build and Run options of your project.

      (Z(:^

      1 Reply Last reply
      0
      • S Offline
        S Offline
        sl.sy.ifm
        wrote on last edited by
        #3

        it's not about running the application ... the effect that I see is that there is something inject into the compile-steps which doesn't happen when building from console ...

        it just came to my mind that one difference is also that creator builds on jom, while our CI builds via nmake ... but in theory this shouldn't inject includepaths

        Oh, btw. forgot to mention that it is Windows(7 and XP) with VS2008 ... qt4.8 prebuild ...

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

          Same is true for building. Open your project, go to "Projects" pane, then open build settings, and see the last section on the bottom: "Build environment" it contains all the variables that Qt Creator uses to build your project.

          (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