From 5e1471c806a387d9953ba3387892190d7f423fbb Mon Sep 17 00:00:00 2001 From: Nathan Rajlich Date: Fri, 6 Jan 2012 15:48:23 -0800 Subject: [PATCH] gyp_addon: link with node.lib on Windows Closes GH-2685 --- tools/addon.gypi | 3 +++ tools/gyp_addon | 1 + 2 files changed, 4 insertions(+) diff --git a/tools/addon.gypi b/tools/addon.gypi index e7152afe4b..e8fb4e2897 100644 --- a/tools/addon.gypi +++ b/tools/addon.gypi @@ -12,6 +12,9 @@ 'conditions': [ [ 'OS=="mac"', { 'libraries': [ '-undefined dynamic_lookup' ], + }], + [ 'OS=="win"', { + 'libraries': [ '-l<(node_root_dir)/$(Configuration)/node.lib' ], }] ] } diff --git a/tools/gyp_addon b/tools/gyp_addon index a93f7b27d9..2dac0e004d 100755 --- a/tools/gyp_addon +++ b/tools/gyp_addon @@ -16,6 +16,7 @@ if __name__ == '__main__': args.extend(['-I', common_gypi]) args.extend(['-Dlibrary=shared_library']) args.extend(['-Dvisibility=default']) + args.extend(['-Dnode_root_dir=%s' % node_root]) args.extend(['--depth=.']); gyp_args = list(args)