문제

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?

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top