Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Node-gyp Include and Library Directories with Boost

I'm attempting to build a Node C++ addon on my Windows 7 machine that uses some classes from the Boost libraries. However, after running

node-gyp configure

successfully, I'm continually assaulted by missing header files when I run

node-gyp build

relating to various Boost headers I included.

I tried setting up the include and library directories manually in the Visual Studio projects created by "configure," but to no avail.

How exactly does one go about defining include directories for node-gyp?

[Edit] After messing around with node-gyp with little success, I explored into building Node modules through Visual Studio instead and, turns out, after several hours, it's finally up and working. Thanks for the assistance.

like image 864
Aetylus Avatar asked Apr 25 '13 12:04

Aetylus


1 Answers

You need to add them in the binding.gyp file:

'include_dirs': [
  '<some directory>',
],
'libraries': [
  '-l<some library>', '-L<some library directory>'
]
like image 156
Jonathan Wiepert Avatar answered Sep 28 '22 04:09

Jonathan Wiepert