Community
Participate
Working Groups
Build Identifier: 20100917-0705 When use the headlessbuilder to build a workset which contains one main projects and several dependent projects, such as main project is projmain and there are two dependent projects projlib and projzend. When use command : eclipse -nosplash -application org.eclipse.cdt.managedbuilder.core.headlessbuild -import path-to-projmain -data /tmp/workspace.13309 -cleanBuild projmain --launcher.suppressErrors -vmargs -Xms128m -Xmx512m It don't build the dependent projects projlib and projzend. And if change command to : eclipse -nosplash -application org.eclipse.cdt.managedbuilder.core.headlessbuild -import path-to-projlib -import path-to-projzend -import path-to-projmain -data /tmp/workspace.13309 -cleanBuild projlib -cleanBuild projzend -cleanBuild projmain --launcher.suppressErrors -vmargs -Xms128m -Xmx512m The build order is like projlib projmain and projzend, it always follows the project name's letter sequence order. So the build would fail when build a main project has dependent projects. Current workaround: manage the project dependency in makefile.target in the main project which like following projlib : command to build this project projzend : command to build this project projmain : projlib projzend Reproducible: Always Steps to Reproduce: 1. set up several projects which one main project dependens on other project and the main project name shouldn't be the last one, like A, B and C, set A or B as main project. 2. use the eclipse headlessbuild command to build the main project. Headlessbuild command line arguments are /** * A headless builder for CDT with additional features. * * IApplication ID: org.eclipse.cdt.managedbuilder.core.headlessbuild * Provides: * - Import projects : -import {[uri:/]/path/to/project} * - Import all projects in the tree : -importAll {[uri:/]/path/to/projectTreeURI} * - Build projects / the workspace : -build {project_name_reg_ex/config_name_reg_ex | all} * - Clean build projects / the workspace : -cleanBuild {project_name_reg_ex/config_name_reg_ex | all} * - Add Include path to build : -I {include_path} * - Add Include file to build : -include {include_file} * - Add preprocessor define to build : -D {prepoc_define} * - Replace environment variable in build : -E {var=value} * - Append environment variable to build : -Ea {var=value} * - Prepend environment variable to build : -Ep {var=value} * - Remove environment variable in build : -Er {var} * - Replace a tool option value: -T {toolid} {optionid=value} * - Append to a tool option value: -Ta {toolid} {optionid=value} * - Prepend to a tool option value: -Tp {toolid} {optionid=value} * - Remove a tool option: -Tr {toolid} {optionid=value} * * Build output is automatically sent to stdout. * @since 6.0 3.
(In reply to comment #0) > Steps to Reproduce: > 1. set up several projects which one main project dependens on other project > and the main project name shouldn't be the last one, like A, B and C, set A or > B as main project. > 2. use the eclipse headlessbuild command to build the main project. Have you set references between the project configurations: Project Properties > C/C++ General > Paths & Symbols > References ? If you don't do this, CDT won't know to build references first.
Sorry, you are right that I didn't do that before, thanks for you information.