The compiler is a C + + compiler (g++?). Official Examples:
Http://nodejs.org/api/addons.html
Private examples:
http://cnodejs.org/topic/4f3dc5e19605c56a4b05351f
V8 API documentation, write-C + + development essentials
This API has an older version of node, which is 10. X's.
Http://izs.me/v8-docs/annotated.html
Node-webkit 0.10.2 based on node 0.11.13
Only official documents
Http://nodejs.org/docs/v0.11.13/api/addons.html#addons_hello_world
Addon Build Tool
Recommended use of Node-gyp, installation method: NPM install-g Node-gyp
It is recommended not to use NODE-WAF.
Build Cmd:node-gyp Configure build or NODE-GYP rebuild
Example Summary
Https://github.com/rvagg/node-addon-examples/tree/master/1_hello_world
There are samples on GitHub.
You need to have BINGING.GYP tell Node-gyp build the source and destination files.
Format:
{
"Targets": [
{
"Target_name": "Pidof",
"Sources": ["pidof.cc"]
}
]
}
source file
C + + source files.
Package information file
Record package information.
Nodejs C + + addon