Code::Blocks Forums

User forums => General (but related to Code::Blocks) => Topic started by: huzhongshan on January 08, 2011, 07:10:42 am

Title: Dependencies donot work properly
Post by: huzhongshan on January 08, 2011, 07:10:42 am
In my workspace , there are 2 project: A.cbp B.cbp , I add A.cbp as dependencies of b.cbp in properties->build targets->dependencies , but It doesnot work.

I manually add the <Depends filename='.....' /> </project> in workspace file , it works.

Is there something wrong?
Title: Re: Dependencies donot work properly
Post by: Jenna on January 08, 2011, 09:07:33 am
Ib B depends on A, it means A has to be build before B.
It does not mean that B is rebuild (or relinked) if A has been updated.
To cover the second case also, you have to set the dependency on an external file in "Properties -> Build targets -> Dependencies".
Title: Re: Dependencies donot work properly
Post by: huzhongshan on January 08, 2011, 10:18:51 am
I add a.cbp use properties->build targets->dependencies , it seems not work.
I manually add the <Depends filename='.....' /> </project> in workspace file , it works.



Title: Re: Dependencies donot work properly
Post by: oBFusCATed on January 08, 2011, 01:12:25 pm
Reread carefully the Jens' post, he has answered you...
Title: Re: Dependencies donot work properly
Post by: huzhongshan on January 09, 2011, 03:05:08 am
I found the answer , I should add the a.cbp in project dependencies , not in  properties->build targets->dependencies , [should use the button in bottom of the property sheet].