News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

Project dependencies not working?

Started by dragan, January 24, 2019, 11:46:05 PM

Previous topic - Next topic

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:
<?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>



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.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

dragan

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

Thanks!