You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | darwin | x64
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
CXX(target) Release/obj.target/first/first.o
warning: include path for stdlibc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead
[-Wstdlibcxx-not-found]
In file included from ../first.cpp:1:
In file included from /Users/hushicai/Library/Caches/node-gyp/6.9.4/include/node/node.h:42:
/Users/hushicai/Library/Caches/node-gyp/6.9.4/include/node/v8.h:21:10: fatal error: 'utility' file not found
#include <utility>
^~~~~~~~~
1 warning and 1 error generated.
make: *** [Release/obj.target/first/first.o] Error 1
In OS X 10.9, Apple switched from gcc to clang which results in a change in the name of the standard library name from libstdc++ (gcc) to libc++ (clang).
Node.js: v6.9.4
node-gyp: 3.6.0
MacOS:10.14.5
按照书中的套路,先install头部文件,再configure生成构建文件,最后build时失败了:
从报错信息中可知,
stdlibc++
头部没找着,建议用libc++
。这里有相关解决方案。
主要的问题在于:
MacOS 10.14.5用clang,链接的c++头部应为libc++,而
[email protected]
链接的却是libstdc++,所以出错了。最终解决方案:
试了一下,[email protected]没有以上问题。
The text was updated successfully, but these errors were encountered: