Author Topic: [bug]"Target is up to date" but not really  (Read 3914 times)


  • Guest
[bug]"Target is up to date" but not really
« on: February 23, 2011, 11:29:49 am »
I recently expertimented a bug. I have a 3 build step project configuration (directly imported from VC project). (I know that 3 steps projects are not very good but making all possibile with 1 build step require to redesign the project entirely).
Let me explain better:
I build 2 different libraries and a dll.
I  compile & run my APP.
If i change the libraries and the dll, c::b does not recognyze that libraries are changed. So it tells "target is up to date" while target is obviously not up to date(and need to be rebuilded at least, in real it needs only to be re-linked).
problem 1)
the executable is broken, it depends on a dll that needs different libraries (wich are not linked since c::b believes that correct libraries are already linked, so the linking is not updated). running the executable directly from the app.exe cause the system crash with a BSOD (blue screen).
problem 2)
the damaged executable can be runned from c::B and that's really unwanted since probably it is damaged. So because i runned always the exe this way i believe that maybe some damages are done on my system(not a problem for me I format PC 2/3 times /year). And i found late the problem when releasing the app caused to my users a BSOD. C::b probably need to check the last modify to linked files and re-link them if changes are found. Hope this will be fixed soon.

Now to make a working release of my porject i have to clean and rebuild entirely all steps. but this way compiling requires to much time since some componentes that are not changed need to be recompiled again
« Last Edit: February 23, 2011, 11:34:25 am by DeomRosso »

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7265
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
Re: [bug]"Target is up to date" but not really
« Reply #1 on: February 23, 2011, 11:49:18 am »
The main app should depend on the library that might have changed.
See the manual :
This makes sure the library is uptodate if you build the main app.

Additional you can and (in your case) should add an external dependency for the relevant targets of your app in "Properties -> Build targets -> Dependencies -> External dependency files" to the appropriate library.