How to use flags during node-gyp configure/build? #173

KevinMartin opened this Issue Dec 6, 2012 · 1 comment


None yet

2 participants



Just had a question, I need to pass a couple flags through (CXXFLAGS, LDFLAGS).

I see that the Makefile has a couple lines of code fetching the flags, but it seems as if doing the following doesn't work. Not sure if I'm doing it wrong or what.

node-gyp configure
node-gyp build CXXFLAGS="-I/some/path/include" LDFLAGS="-L/some/path/lib"

I am on Mac OS X, Mountain Lion. Latest XCode.

Thank you in advance,

Kevin Martin.


Just put the env variables before the node-gyp command:

$ node-gyp configure
$ CXXFLAGS="-I/some/path/include" LDFLAGS="-L/some/path/lib" node-gyp build
@TooTallNate TooTallNate closed this Dec 6, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment