4

ノードの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をインストールしています

4

1 に答える 1

2

これらのフラグを追加する必要があることがわかりました:

        [
          '-mmacosx-version-min=10.7',
          '<!@(pkg-config --cflags pHash)',
          '-std=c++11',
          '-stdlib=libc++'
        ]
于 2015-04-26T06:24:40.583 に答える