Tuesday, 15 June 2010

c++ - NodeJS addon can just be executed with self compiled nodeJS -



c++ - NodeJS addon can just be executed with self compiled nodeJS -

i tried work on compiling c++/cli nodejs addons. example, wanted read windows event logs.

at first, compiled nodejs node.lib file. basicly, followed steps mentioned in document: http://coderesearchlabs.com/articles/bnwca.pdf

i set visualstudio project include , library paths pointing compiled node 0.10.28 directories. in project made utilize of system::diagnostics::eventlog class: http://msdn.microsoft.com/en-us/library/vstudio/system.diagnostics.eventlog

after finishing c++ project, compiled , utilize node.exe first step.

now, tried utilize "eventreader.node" file on other machine. couldn't require node file:

error: no error

this error got after requiring node-file.

some hints: both machines run windows 7 professional nodejs version self compiled: 0.10.28 src nodejs version tried run addon with: 0.10.28 msi

edit: after using node-gyp, need set references in vxproj-file. in special these ones:

<itemgroup> <reference include="system" /> <reference include="system.core" /> <reference include="system.data" /> <reference include="system.xml" /> </itemgroup>

but how add together these gyp-file?

c++ node.js add-on

No comments:

Post a Comment