简体   繁体   中英

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.

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

'include_dirs': [
  '<some directory>',
],
'libraries': [
  '-l<some library>', '-L<some library directory>'
]

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM