Frage

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?

War es hilfreich?

Lösung

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.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top