美文网首页
fatal error: faiss/IndexHNSW.h:

fatal error: faiss/IndexHNSW.h:

作者: afwer3 | 来源:发表于2020-09-17 14:51 被阅读0次
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的头文件改写:

include </home/yangkaixiang/github/faiss/usr/local/include/faiss/IndexHNSW.h>

include </home/yangkaixiang/github/faiss/usr/local/include/faiss/HNSW.h>

include </home/yangkaixiang/github/faiss/usr/local/include/faiss/index_io.h>

相关文章

网友评论

      本文标题:fatal error: faiss/IndexHNSW.h:

      本文链接:https://www.haomeiwen.com/subject/mcblyktx.html