%.cppo :%.cpp %.h @echo Compiling Src file:[$(notdir $<)]... $(CC) $(CXXFLAGS) -c $< -o $@当没有 %.h时,会出错。make: *** No rule to make target 'CircularQueueTest.cppo', needed by 'gtest'。 停止。因此,依赖文件必须都存在。