Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4126734
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T00:04:16+00:00 2026-05-21T00:04:16+00:00

Sometimes when I change code in my Qt project (Qt Creator 2.1.0 with mingw32),

  • 0

Sometimes when I change code in my Qt project (Qt Creator 2.1.0 with mingw32), the changes don’t get reflected in the produced machine code after building it. This happens mostly when I change things like default values in constructors or the order of parameters in methods/constructors. Usually, a full rebuild fixes that (but takes a few minutes).

I’m helping myself by deleting the generated executables or librarys before building, which seems to help most of the time. Does that mean that theres something going wrong when linking the object files?

I’m coming from java/.net and I’m used to a different behaviour. I’d be happy if anyone could explain me what I’m doing wrong and/or point me to some related articles.

Thank you!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T00:04:17+00:00Added an answer on May 21, 2026 at 12:04 am

    Usually, after a change in a header, all source files including that header should be rebuilt.
    However, qmake is a bit peculiar in this regard, you need to set DEPENDPATH for include folders other than the current directory. E.g., if you have

    INCLUDEPATH += somepath_in_my_project
    

    also add

    DEPENDPATH += some_path_in_my_project
    

    Only with DEPENDPATH, files built by the .pro files are rebuilt if some header in some_path_in_my_project changes (if they include that header)!

    I suggest to add for each INCLUDEPATH line an identical DEPENDPATH line, unless you include some system directory you don’t expect to change.

    Edit:

    A similar problem exists when linking statically with qmake: If the static lib foo.a changes, binaries linking against it are not relinked. That’s a bug in QMake, not generating the correct dependencies.

    A workaround I found in a former project:

    static:unix:TARGETDEPS += path_to_my/somestaticlib.a
    static:win32:TARGETDEPS += path_to_my/somestaticlib.lib
    

    Edit edit:

    Since some time (Qt 5?), above code should use POST_TARGETDEPS instead of TARGETDEPS.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My situation: I have several components, which sometimes have changes to them, and are
Sometimes, when we're doing small changes to our web apps, e.g. bug fixes, we
When making changes using SubmitChanges() , LINQ sometimes dies with a ChangeConflictException exception with
Sometimes I have to work on code that moves the computer clock forward. In
Sometimes a labeled break or continue can make code a lot more readable. OUTERLOOP:
I am facing a weird problem. While browsing the C code of a project,
I'm working on a very large project with three phases of source code. Development
The Scenario I have an ASP.Net Web Project that uses a master page. This
The application's code and configuration files are maintained in a code repository. But sometimes,
We are a company, working on small and some huge project. Sometimes on one

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.