在Mac上编译Node源代码时出现cmake错误''ld:framework not found -lCoreFoundation“

时间:2015-12-30 11:49:57

标签: c++ node.js macos

我想在CLion中编译节点,所以我通过gyp创建了一个CMakeLists.txt文件,但是发生了这个错误:

ld: framework not found -lCoreFoundation
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: *** [node] Error 1
make[2]: *** [CMakeFiles/node.dir/all] Error 2
make[1]: *** [CMakeFiles/node.dir/rule] Error 2
make: *** [node] Error 2

CMakeLists.txt的部分:

target_link_libraries(node
-Wl
  cares
  v8_libplatform
  openssl
  zlib
  http_parser
  libuv
  v8_base
  v8_libbase
  v8_snapshot
-Wl
  -framework CoreFoundation
  -lm
)

0 个答案:

没有答案