Is it necessary for Node.js (version 0.11+) addons to defineBUILDING_NODE_EXTENSION macro? The compiler warns me that the macro is enabled by default.
The macro is defined on the command line by node-gyp. You can see that by setting "V" to "1" when running node-gyp:
node-gyp build V=1
To be safe, you could define it like following:
#ifndef BUILDING_NODE_EXTENSION
#define BUILDING_NODE_EXTENSION 1
#endif /* BUILDING_NODE_EXTENSION */
Examples in the Addons Documentation define this macro. Is this deprecated?
You can find the binary add-ons documentation that matches the latest unstable release here:
I haven't tested the examples, but they do not define BUILDING_NODE_EXTENSION.
Please let us know if that helps. If you find any problem in the binary add-ons documentation,
please file an issue at https://github.com/joyent/ node/issues.
댓글 없음:
댓글 쓰기