Question

I download the node js v0.10.12 tar file ,untar,configure make and install but I can't find the Include fils for making cpp addons why?

Was it helpful?

Solution

You won't find them, as is explained in the documentation:

Node statically compiles all its dependencies into the executable. When compiling your module, you don't need to worry about linking to any of these libraries.

You can simply include them as:

#include <node.h>
#include <v8.h>

using namespace v8;

Though, to compile an addon, you'll need node-gyp installed globally, its runtime dependencies for your OS, and a binding.gyp for your project. Then:

node-gyp configure
node-gyp build

Or:

node-gyp rebuild

Read through the "Hello World" example/tutorial for more info.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top