我有一个由同事做的节点扩展,我正在尝试编译它node-gyp configure
(一切都好)然后node-gyp build
(fatal error, 'thread' file not found
).现在,我相信这是gcc的一个问题,我在某处读到了我需要的标志-stdlib=libc+++
.我的binding.gyp
文件看起来像这样:
{ "targets": [ { "target_name": "overcpu", "sources": [ "overcpu.cpp" ], "cflags" : [ "-stdlib=libc++" ] } ] }
但我仍然得到错误.我安装了XCode和开发人员工具,而且我gcc
通过安装不满意brew
.不幸的是我一直收到同样的错误.通过gcc -v
我得到以下输出:
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn) Target: x86_64-apple-darwin13.3.0 Thread model: posix
我的问题是否有问题gcc
,或者它node-gyp
(v1.0.1)是否让我发疯?
非常感谢!