Skip to content

Instantly share code, notes, and snippets.

@kjunichi
Last active December 26, 2015 20:19
Show Gist options
  • Save kjunichi/7207455 to your computer and use it in GitHub Desktop.
Save kjunichi/7207455 to your computer and use it in GitHub Desktop.

Mavericksでldがリンクエラーを吐き、ビルドできない件

ldが-lAntTweakBarに必要なライブラリが見つからないとブーたれてくる。。

 SOLINK_MODULE(target) Release/glfw.node
ld: library not found for -lAntTweakBar
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Release/glfw.node] Error 1

解決した

エラーとなったのはnode-webclで依存しているnode-glfwであり、コマンドラインで、ヘッダのパスと、 ライブラリのパスを追加して解決した。

CXXFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/lib" npm install node-webcl

node-gypの動き

node-gyp rebuild

Ubuntuだとnode-gypがnvm管理下で以下のパス隠されていた(PATHが通っていない)

~/.nvm/v0.10.21/lib/node_modules/npm/bin/node-gyp-bin/node-gyp rebuild

関連Gist

Link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment