致命错误:打开依赖文件C ++

时间:2017-03-24 00:57:59

标签: c++ compiler-errors

我在编译程序时遇到致命错误(使用make)。是因为一些许可问题吗?

make -C src/hash_function
make[1]: Entering directory `....../src/hash_function'
g++ -std=c++11 -Wall -pedantic -funsigned-char -msse4.2  -I "/export/SOFTWARE/boost_1_61_0" -MMD -c farmhash.cpp -o ../../obj/farmhash.o
farmhash.cpp:1965:1: fatal error: opening dependency file ../../obj/farmhash.d: No such file or directory
 }  // namespace NAMESPACE_FOR_HASH_FUNCTIONS
 ^
compilation terminated.
make[1]: *** [../../obj/farmhash.o] Error 1

Makefile如下所示,我对如何处理../../obj/farmhash.o

感到困惑
CC       = g++
CCFLAGS  = -std=c++11 -Wall -pedantic -funsigned-char -msse4.2
LDFLAGS  =
INCLUDE  = -I "/export/SOFTWARE/boost_1_61_0"

EXE      = main
AUXFLAGS =
OPTFLAGS =
LIBS  = main.a index.a hash_map.a hash_function.a utils.a
LIBS := $(addprefix lib/,$(LIBS))

all: build/$(EXE)
run: all
         clear
         ./build/$(EXE) $(INPUT) $(QUERIES)

build/$(EXE): libs
        $(CC) $(LDFLAGS) $(OPTFLAGS) $(LIBS) $(AUXFLAGS) -o $@

libs:
        $(MAKE) -C src/hash_function
        $(MAKE) -C src/hash_map
        $(MAKE) -C src/index
        $(MAKE) -C src/main
        $(MAKE) -C src/utils

.PHONY: clean

clean:
        rm -f build/main
        rm -f lib/*.a
        rm -f obj/*.d obj/*.o

rebuild: clean all

0 个答案:

没有答案