加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

c – 找不到“initializer_list”文件

发布时间:2020-12-16 07:11:44 所属栏目:百科 来源:网络整理
导读:尝试为节点安装phash-image但我收到此错误: phash-image@3.1.0 install /Users/jong/Workspace/mgmtio/phash-image node-gyp rebuild CXX(target) Release/obj.target/pHash/phash.oIn file included from ../phash.cpp:4:In file included from /usr/local
尝试为节点安装phash-image但我收到此错误:

> phash-image@3.1.0 install /Users/jong/Workspace/mgmtio/phash-image
> node-gyp rebuild

  CXX(target) Release/obj.target/pHash/phash.o
In file included from ../phash.cpp:4:
In file included from /usr/local/Cellar/phash/0.9.6_1/include/pHash.h:50:
/usr/local/include/CImg.h:160:10: fatal error: 'initializer_list' file not found
#include <initializer_list>
         ^
1 error generated.
make: *** [Release/obj.target/pHash/phash.o] Error 1

我该如何解决?我在os x 10.10.3上安装了自制的phash

解决方法

发现我需要添加这些标志:

[
          '-mmacosx-version-min=10.7','<!@(pkg-config --cflags pHash)','-std=c++11','-stdlib=libc++'
        ]

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读