From 1c62e807e105d8335bf96d2cd3db786ceff33782 Mon Sep 17 00:00:00 2001 From: Roman Shtylman Date: Mon, 28 Nov 2011 14:44:23 -0500 Subject: [PATCH] doc: add note about NODE_MODULE module_name requirement module_name needs to match the final binary name --- doc/api/addons.markdown | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/api/addons.markdown b/doc/api/addons.markdown index 3e815d4d44e..b0040141265 100644 --- a/doc/api/addons.markdown +++ b/doc/api/addons.markdown @@ -51,6 +51,9 @@ Note that all Node addons must export an initialization function: There is no semi-colon after `NODE_MODULE` as it's not a function (see `node.h`). +The `module_name` needs to match the filename of the final binary (minus the +.node suffix). + The source code needs to be built into `hello.node`, the binary Addon. To do this we create a file called `wscript` which is python code and looks like this: