我工作的一个C++项目与它由一个图书馆项目的Linux的Eclipse CDT的:重建依赖项目
运行Eclipse靛蓝+ CDT,并与单元测试该库的项目。
很明显,第二个项目取决于第一个项目。
这两个项目都使用外部构建器
但是,当我修改第一个项目的标题时,它不重建测试项目。我无法做到这一点......即使标题包含在测试项目中,它也会重新链接第二个项目。这非常令人讨厌,因为我经常在图书馆工作的时候开始工作,然后在某个时候我做了一次完整的重建,而且我看到了一大堆错误,就我30分钟前做的事情而言!
例如CDT全球建立控制台输出:
**** Build of configuration Debug for project libxxx ****
make -j all
Building file: ../foo.cpp
Invoking: GCC C++ Compiler
ccache g++ -I"/home/foke/workspaces/cpp/libxxx/include" -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"foo.d" -MT"foo.d" -o "foo.o" "../foo.cpp"
Finished building: ../foo.cpp
Building target: libxxx.a
Invoking: GCC Archiver
ar -r "libxxx.a" ./foo.o ./src/yyy.o ./src/detail/zzz.o
ar: creating libxxx.a
Finished building target: libxxx.a
**** Build Finished ****
**** Build of configuration Debug for project libxxx_tests ****
make -k -j all
Building target: libxxx_tests
Invoking: Cross G++ Linker
g++ -L"/home/foke/workspaces/cpp/libxxx/Debug" -o "libxxx_tests" ./main.o ./aaa.o ./tests/bbb.o ./tests/ccc.o ./tests/ddd.o -lboost_unit_test_framework -lxxx
Finished building target: libxxx_tests
**** Build Finished ****
嗨,这是行不通的。很久以前,我对这个问题感到沮丧。我在这里问它:http://stackoverflow.com/questions/9884827/eclipse-cdt-not-building-project-on-header-file-change并在这里发布这个eclipse的bug:https://bugs.eclipse.org /bugs/show_bug.cgi?id=375800 – haelix
适用于Code Composer Studio 5.5.0,据我所知它基于Eclipse 3.8.1和CDT 8.1.1 –