User forums > Help

Building project on command line with dependencies

<< < (2/3) > >>

cacb:
Looks like relative paths for include & libraries. Then you must have same current dir in both cases.

rgleim:
Correct. Everything is relative paths based on the current dir. I tried including external dependencies as well, but still no good.

Could someone setup a simple test project where there's a lib, built in code blocks, and a project that has a dependency on it. Then see it "clean" and "build" both projects in the IDE, when just calling on the main project, and then try to repeat on the command line?

stahta01:

--- Quote from: rgleim on September 14, 2023, 10:11:58 pm ---External Dependencies attached.  Not really sure how to use this.  It works as I expect when I build inside the IDE.  Why would it be different on the command line?

--- End quote ---

If that is blank then you are using workspace depends; if you are using that then you should try building the workspace instead of the CB project.
Edit: I have no idea if that is possible.

Tim S.

rgleim:
I found the attached on the code::blocks wiki, but after setting up the external dependencies in the project, it's still not working on the command line.

Building the workspace works, but that doesn't work on the build machine because we don't save/have a workspace in the build system.

rgleim:
Looks like what I'm gathering is that you can't build a single project on the command line and have it figure out the dependent projects, and then build those.  Workspace builds work because it has knowledge of all other projects. Command line looks like you need to specify each individual project, in the order you want, to create the final executable.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version