tag:blogger.com,1999:blog-7761120478392541874.post8034345499429780322..comments2024-03-08T09:56:07.315+02:00Comments on Botsikas' Blog: Building native modules for nodeJs 0.6+ with visual studioAndreas Botsikashttp://www.blogger.com/profile/01752587180565072980noreply@blogger.comBlogger9125tag:blogger.com,1999:blog-7761120478392541874.post-17849621644894174442014-04-02T21:49:44.662+03:002014-04-02T21:49:44.662+03:00Thank you for the guide, it is very helpful!Thank you for the guide, it is very helpful!Anonymoushttps://www.blogger.com/profile/00463657489860237988noreply@blogger.comtag:blogger.com,1999:blog-7761120478392541874.post-66154610820532688012012-05-10T18:17:22.826+03:002012-05-10T18:17:22.826+03:00I have tried with node 0.6.17 on windows. To make ...I have tried with node 0.6.17 on windows. To make HelloWorld working I have modified the code like:<br />extern "C" void NODE_EXTERN init (Handle Object target)<br />{<br /> HelloWorld::Init(target);<br />}Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-7761120478392541874.post-1431281508835974042012-01-29T00:21:40.060+02:002012-01-29T00:21:40.060+02:00Note: the nodejs vcbuild.bat doesn't work in d...Note: the nodejs vcbuild.bat doesn't work in directories which have spaces, due to a dependency. So use a simple directory like c:\nodejs.<br /><br />The last comment, "module_name needs to match the filename of the final binary" was pretty important. I had forgotten that. Tutorial works great, thanks!Eric Muyserhttps://www.blogger.com/profile/15434323864916255798noreply@blogger.comtag:blogger.com,1999:blog-7761120478392541874.post-25869216721466484252012-01-12T01:52:15.446+02:002012-01-12T01:52:15.446+02:00@esmitt also make sure you check http://nodejs.org...@esmitt also make sure you check http://nodejs.org/docs/latest/api/addons.html. <br /><br />Note that all Node addons must export an initialization function:<br /><br />NODE_MODULE(module_name, Initialize)<br /><br />The module_name needs to match the filename of the final binary (minus the .node suffix).Andreas Botsikashttps://www.blogger.com/profile/01752587180565072980noreply@blogger.comtag:blogger.com,1999:blog-7761120478392541874.post-7292013675447460752012-01-12T01:30:41.551+02:002012-01-12T01:30:41.551+02:00@esmitt: This is a generic error that node couldn&...@esmitt: This is a generic error that node couldn't load your module. A bug I have noticed in the current version of node in windows is that it doesn't load any module with a - in their names (btw, i hope it's an error the space between the name and the extension in your comment). If this is not your case, check your dependencies with http://www.dependencywalker.com/ and make sure that node has access to all your dependencies. If even this is not your case check my post on debuging node loading modules (http://botsikas.blogspot.com/2011/12/debugging-native-node-modules-loading.html) or edit node.cc from line 1606 and on to display the actual system error (err.sys_errno_) and look it up (see my post) to have a better understanding of your problem. A quick and ugly hack to do that is the following code:<br /><br />printf("System error code: %d",err.sys_errno_); <br /><br />You should also do something similar to the generic "Out of memory." exception thrown in the same code file so that you can track down the exact problem.<br /><br />If this doesn't help you either, then please post the code cause it might be an error there...Andreas Botsikashttps://www.blogger.com/profile/01752587180565072980noreply@blogger.comtag:blogger.com,1999:blog-7761120478392541874.post-47773809929990413642012-01-11T22:37:21.776+02:002012-01-11T22:37:21.776+02:00Hi, I follow all your steps and I compile the .cpp...Hi, I follow all your steps and I compile the .cpp in order to obtain the .node file. Then, I got the following error:<br /><br />Loading module from :<br />> C:Project\Debug\Again. node<br /><br />node.js:201<br /> throw e; // process.nextTick error, or 'error' event on first tick<br /> ^<br />Error: Out of memory.<br /> at Object..node (module.js:463:11)<br /> at Module.load (module.js:351:31)<br /> at Function._load (module.js:310:12)<br /> at Module.require (module.js:357:17)<br /> at require (module.js:368:17)<br /> at Object. (C:\Project\Debug\some.js:3:18)<br /> at Module._compile (module.js:432:26)<br /> at Object..js (module.js:450:10)<br /> at Module.load (module.js:351:31)<br /> at Function._load (module.js:310:12)<br /><br />Any idea about it? Out of memory error? I was using the same .js and .cpp that you post here.<br />Thanks in advancedesmitthttps://www.blogger.com/profile/10206410171015773088noreply@blogger.comtag:blogger.com,1999:blog-7761120478392541874.post-42821743040700338632012-01-03T08:37:47.200+02:002012-01-03T08:37:47.200+02:00It turns out 0.6.6 has this problem. I went back t...It turns out 0.6.6 has this problem. I went back to 0.6.2 and can build node.js. Thanks again for your post!Brad Williamshttps://www.blogger.com/profile/09839532299808900672noreply@blogger.comtag:blogger.com,1999:blog-7761120478392541874.post-39923274804083627722012-01-03T02:03:51.579+02:002012-01-03T02:03:51.579+02:00Thanks for this post! I downloaded 0.6.6 node sour...Thanks for this post! I downloaded 0.6.6 node source, and have python 2.7.2, but vcbuild.bat gives error almost immediately:<br />C:\nodejs>vcbuild.bat<br />Traceback (most recent call last):<br /> File "tools\gyp_node", line 59, in <br /> run_gyp(gyp_args)<br /> File "tools\gyp_node", line 18, in run_gyp<br /> rc = gyp.main(args)<br /> File ".\tools\gyp\pylib\gyp\__init__.py", line 471, in main<br /> options.circular_check)<br /> File ".\tools\gyp\pylib\gyp\__init__.py", line 111, in Load<br /> depth, generator_input_info, check, circular_check)<br /> File ".\tools\gyp\pylib\gyp\input.py", line 2270, in Load<br /> depth, check)<br /> File ".\tools\gyp\pylib\gyp\input.py", line 387, in LoadTargetBuildFile<br /> build_file_path)<br /> File ".\tools\gyp\pylib\gyp\input.py", line 1010, in ProcessVariablesAndConditionsInDict<br /> build_file)<br /> File ".\tools\gyp\pylib\gyp\input.py", line 1025, in ProcessVariablesAndConditionsInList<br /> ProcessVariablesAndConditionsInDict(item, is_late, variables, build_file)<br /> File ".\tools\gyp\pylib\gyp\input.py", line 984, in ProcessVariablesAndConditionsInDict<br /> ProcessConditionsInDict(the_dict, is_late, variables, build_file)<br /> File ".\tools\gyp\pylib\gyp\input.py", line 842, in ProcessConditionsInDict<br /> if eval(ast_code, {'__builtins__': None}, variables):<br /> File "", line 1, in <br />NameError: name 'node_use_isolates' is not defined while evaluating condition 'node_use_isolates=="true"' in node.gyp while trying to load node.gyp<br />Failed to create vc project files.<br /><br />Any ideas?Brad Williamshttps://www.blogger.com/profile/09839532299808900672noreply@blogger.comtag:blogger.com,1999:blog-7761120478392541874.post-72458486711742174682011-12-10T06:26:41.378+02:002011-12-10T06:26:41.378+02:00thank you so much for this! this is what I wanted ...thank you so much for this! this is what I wanted to do but didn't know how.Warspawnhttps://www.blogger.com/profile/02177666626364259020noreply@blogger.com