faiss 编译的坑

在编译Faiss库时遇到错误,原因为缺少C++11标准的支持。通过在编译命令中添加'-std=c++11'标志,成功解决了编译不通过的问题。
摘要由CSDN通过智能技术生成

编译过程报错:

g++ -o demos/demo_ivfpq_indexing -fPIC -m64 -Wall -g -O3 -mavx -msse4 -mpopcnt -fopenmp -Wno-sign-compare -fopenmp demos/demo_ivfpq_indexing.cpp libfaiss.a -g -fPIC  -fopenmp /usr/lib64/libopenblas.so.0
In file included from demos/../IndexIVF.h:21:0,
                 from demos/../IndexIVFPQ.h:18,
                 from demos/demo_ivfpq_indexing.cpp:19:
demos/../Heap.h:190:9: warning: identifier ‘nullptr’ is a keyword in C++11 [-Wc++0x-compat]
         const typename C::T * x = nullptr,
         ^
demos/../Heap.h:190:35: error: ‘nullptr’ was not declared in this scope
         const typename C::T * x = nullptr,
                                   ^
demos/../Heap.h:191:38: error: ‘nullptr’ was not declared in this scope
         const typename C::TI * ids = nullptr,

看着编译的时候没有加上 -std=c++11


                
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值