fatal error: faiss/IndexHNSW.h:
2020-09-17 本文已影响0人
afwer3
demo_hnsw.cpp:12:10: fatal error: faiss/IndexHNSW.h: No such file or directory
12 | #include <faiss/IndexHNSW.h>
| ^~~~~~~~~~~~~~~~~~~
在demos/makefile文件里加入:
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
-include ../makefile.inc
DEMOS_SRC=$(wildcard demo_*.cpp)
DEMOS=$(DEMOS_SRC:.cpp=)
all: $(DEMOS)
clean:
rm -f $(DEMOS)
%: %.cpp
$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(CPUFLAGS) -o $@ $^ $(LDFLAGS) $(LIBS) -L/home/yangkaixiang/github/faiss/usr/local/lib -lfaiss -Wl,-rpath=/home/yangkaixiang/github/faiss/usr/local/lib/
.PHONY: all clean
demo_hnsw的头文件改写: