Author Topic: Cannot rebuild project dependencies?  (Read 4170 times)

Offline photon3108

  • Multiple posting newcomer
  • *
  • Posts: 32
Cannot rebuild project dependencies?
« on: June 09, 2009, 04:52:36 am »
(1). There are two projects, A and B. Each file are saved and each project are builded.

And then I set that B depends on A. If B is active and I change some files in A,

Code::Blocks only rebuild B but not both of them.


(2). Actually when I set B depends on A, I cannot choose build target, for example,

B's GCC_Release_O2 depends on A'GCC_Release_O2 and

B's GCC_Release_O3 depends on A'GCC_Release_O3.


How can I solve these two problems? Thanks.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: Cannot rebuild project dependencies?
« Reply #1 on: June 09, 2009, 07:31:49 am »
Do the build targets in both projects really have the same names (no leading and trailing whitespaces, case-sensisitive) ?

If yes, it would be nice if you can provide a simple test case for download.

Offline photon3108

  • Multiple posting newcomer
  • *
  • Posts: 32
Re: Cannot rebuild project dependencies?
« Reply #2 on: June 09, 2009, 07:58:01 am »
Thanks for your help.


NO, they don't have the same name.

In fact one build target is gcc_shared_release and another is gcc_bin_release.

Should I rename they to the same one? I don't know. Because shared library

and executable binary file are different. If I did it, it will confuse me with the same name.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: Cannot rebuild project dependencies?
« Reply #3 on: June 09, 2009, 09:49:58 am »
If the target names differ, it will not work.

As workaround, you can create virtual targets, which are named the same in both projects, and make the appropriate real targets members of them.

For example gcc_shared_release and gcc_bin_release can be member of a virtual target called gcc_release, that exists in both projects.
If you now compile gcc_release, the dependencies should work.