phash-image@3.1.0 install /Users/jong/Workspace/mgmtio/phash-image-6ren">
gpt4 book ai didi

c++ - "initializer_list"找不到文件

转载 作者:塔克拉玛干 更新时间:2023-11-03 02:16:50 24 4
gpt4 key购买 nike

尝试为 Node 安装 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 上并使用 Homebrew 软件安装了 phash

最佳答案

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

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

关于c++ - "initializer_list"找不到文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29870388/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com