What version of CDT are you using?
If you have the recent CDT 6+ installed, you can perform a project import (as well as build), from the command line. To do this:
eclipse -nosplash
-application org.eclipse.cdt.managedbuilder.core.headlessbuild
-import {[uri:/]/path/to/project}
-build {project_name | all}
-cleanBuild {projec_name | all}
The import switch can be used by itself. You'll need to specify the workspace you wish to import into with -data as normal to Eclipse. The switches illustrated above are provided by the CDT managedbuild plugin, but should work with non-CDT projects (if not, let me know -- I wrote the feature ;) ).
See this question on headless build for more details on the other switches.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…