User forums > Help

Project dependencies not working?

(1/1)

dragan:
As I understand, if you have workspace and you go to Properties > Project Dependencies, you can choose ohter project that should build before the primary project is built.
For example, I have the primary project named CoreBSP and other one called stb_image which produces stb_image.a library.



This is the workspace, as I can see, its ok:

--- Code: ---<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_workspace_file>
<Workspace title="CoreBspViewer">
<Project filename="stb_image/stb_image.cbp" />
<Project filename="CoreBSP.cbp">
<Depends filename="stb_image/stb_image.cbp" />
</Project>
</Workspace>
</CodeBlocks_workspace_file>
--- End code ---


However, its not working at all, you have to build stb_image manually in order to link CoreBSP.

Build/Clean workspace also doesn't works, it builds only the activated project...

Am I missing something?
Im using CB 17.12 on Windows.

sodev:
You have to build the primary project to build its dependencies. Building a project X does not build other projects Y that depend on X, it only builds the projects Z that project X depends on.

Other than that, dependencies work for me, however im on r11417, but a quick check of the logs didnt reveal any changes to the dependency system after your release.

dragan:
That's odd, if I build the main project, it should first build the library.

oBFusCATed:
You have to have matching target names in both projects. If they aren't matching then nothing would be built.

dragan:
Oh, wait, you're right, my target names are different indeed, it works now  8)

Thanks!

Navigation

[0] Message Index

Go to full version