User forums > Using Code::Blocks

Dependencies

(1/1)

johne53:
So far, I've only created a simple "Hello World" type application. But suppose I wanted to create a more complex project where (say) an executable is dependent on one or more libs. How is this done using C::B? Do the libs have to be in their own project or can one project have several branches? And how do I mark a project (or branch) as being dependent on another?

johne53:
A popup tool tip just appeared telling me that one project can have many build targets - such as a static library and also an application that uses the library. Can anyone expand on that and tell me how it's done?

TDragon:
Take a look at the Build targets section of your project's properties dialog. The list of targets is on the left; you can add and remove targets from it. Each target's properties are displayed on the right. Rather than trying to make C::B track inter-target dependencies, you merely rearrange the order of the targets so the ones that are depended on come first. You can also create "Virtual Targets", which merely specify a subset of all the project's targets to be built.

Hope that helps,
John E. / TDM

Navigation

[0] Message Index

Go to full version