I have created my own native binding like this: http://pastebin.com/pEujzNfc
I have created the correct binding.gyp file, and installed node-gyp. I use
node v0.6.12.
$ node-gyp configure
info it worked if it ends with ok
spawn python [ '/Users/andi/.node-gyp/0.6.12/tools/gyp_addon',
'binding.gyp',
'-f',
'make',
'-Dtarget_arch=x64' ]
info done ok
Andis-MacBook:native andi$ node-gyp build
info it worked if it ends with ok
spawn make [ 'BUILDTYPE=Release', '-C', 'build' ]
make: Nothing to be done for `all'.
info done ok
This is my index.js:
try {
var binding = require('./build/Release/binding')
}
catch (e) {
console.log(e)
}
Result:
$ node index.js
[Error: invalid argument]
Any help on what I should change to make it work? Probably
"-Dtarget_arch=x64" is the problem since my MacBook processor is 32 bit.
Shouldn't this be detected by configure.
--
Job Board: http://jobs.nodejs.org/
Posting guidelines:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en